From 6cf02796b219222d336fc0f6308b6235a4f88902 Mon Sep 17 00:00:00 2001 From: Bradley Taunt Date: Wed, 16 Sep 2026 09:51:36 -0400 Subject: Include deploy action Initial testing for auto deploy from Github --- .github/workflows/deploy.yml | 35 +++++++++++++++++++++++++++++++++++ 1 file changed, 35 insertions(+) create mode 100644 .github/workflows/deploy.yml (limited to '.github/workflows') diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..5237dc7 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,35 @@ +# .github/workflows/deploy.yml +name: Deploy + +on: + push: + branches: [deploy] + +env: + DEST: /home/public/1mb.club + SERVER: ssh.nyc1.nearlyfreespeech.net + BUNDLE_PATH: vendor/bundle + +jobs: + deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: ruby/setup-ruby@v1 + with: + ruby-version: '3.3' + bundler-cache: true + + - name: SSH setup + run: | + mkdir -p ~/.ssh + echo "${{ secrets.NFS_ACCESS }}" > ~/.ssh/id_ed25519 + chmod 600 ~/.ssh/id_ed25519 + ssh-keyscan -H -4 "$SERVER" >> ~/.ssh/known_hosts + + - name: Build + run: bundle exec jekyll build + + - name: Deploy + run: rsync -rltvz --delete -e "ssh -i ~/.ssh/id_ed25519" _site/ "${{ secrets.NFS_USER }}@$SERVER:$DEST/" -- cgit v1.3.1