Example of Kamal deployment from Github Actions.
Add your applications .env
variables to the Github repo as a repository secret, you can find this under the repo settings => secrets and variables => actions
https://github.com/username/repo_name/settings/secrets/actions
you are going to need an ssh private key that your deployment server is aware of (add public key to servers .ssh/authorized_keys) and add the ssh private key as a repo secret
create action workflows
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/* | |
Copy this into the console of any web page that is interactive and doesn't | |
do hard reloads. You will hear your DOM changes as different pitches of | |
audio. | |
I have found this interesting for debugging, but also fun to hear web pages | |
render like UIs do in movies. | |
*/ | |
const audioCtx = new (window.AudioContext || window.webkitAudioContext)() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
filename="$1" | |
gitmoji=(:art: :zap: :fire: :bug: :ambulance: :sparkles: :pencil: :rocket: :lipstick: :tada: :white_check_mark: :lock: :apple: :penguin: :checkered_flag: :robot: :green_apple: :bookmark: :rotating_light: :construction: :green_heart: :arrow_down: :arrow_up: :construction_worker: :chart_with_upwards_trend: :recycle: :whale: :heavy_plus_sign: :heavy_minus_sign: :wrench: :globe_with_meridians: :pencil2: :poop: :rewind: :twisted_rightwards_arrows: :package: :alien: :truck: :page_facing_up: :boom: :bento: :ok_hand: :wheelchair: :bulb: :beers: :speech_balloon: :card_file_box: :loud_sound: :mute: :busts_in_silhouette: :children_crossing: :building_construction: :iphone: :clown_face: :egg: :see_no_evil: :camera_flash: :alembic: :mag: :wheel_of_dharma: :label: :seedling: :triangular_flag_on_post: :goal_net: :dizzy: :wastebasket:) | |
lineno=0 | |
error() { | |
echo "$1" | |
echo | |
echo "--" | |
echo "Please refer to https://gitmoji.carloscuesta.me/ for required gitmoji info and https://chris.beams.io/posts |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/usr/bin/python | |
#original script by Rob Napier <robnapier@gmail.com> | |
#updates by github.com/gngrwzrd | |
#Script to link in all your old SDKs every time you upgrade Xcode | |
#Create a directory somewhere to store older SDKs in | |
#Under it, put all the platform directories: | |
# MacOSX.platform iPhoneOS.platform iPhoneSimulator.platform | |
#Under those, store the SDKs: |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
releases_path=/data/sites/yoursite.com/releases # change this | |
keep_releases=5 | |
versions=`ls -xt $releases_path` | |
releases=(${versions// / }) | |
# check available number of versions in releases directory | |
releases_count=${#releases[@]} | |
if [ $releases_count -le $keep_releases ] |