Deploy #1327
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
--- | |
name: Deploy | |
concurrency: | |
group: deploy | |
cancel-in-progress: true | |
on: | |
push: | |
branches: [main] | |
jobs: | |
deploy: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true | |
- name: Build Site | |
run: bundler exec jekyll build | |
- name: Install SSH Key | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "${{ secrets.SSH_PRIVATE_KEY }}" > ~/.ssh/id_ed25519 | |
chmod 700 ~/.ssh/id_ed25519 | |
- name: Deploy to Server | |
env: | |
RSYNC_RSH: ssh -o StrictHostKeyChecking=no -o PubkeyAuthentication=yes -o PasswordAuthentication=no | |
run: rsync --checksum --recursive --delete --out-format "%n" _site/ [email protected]:/var/www/writing.kemitchell.com/ |