add antiindividualistic individuality blog post #33
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 | |
on: | |
push: | |
branches: ["main"] | |
workflow_dispatch: | |
concurrency: | |
group: "production" | |
cancel-in-progress: false | |
jobs: | |
deploy: | |
environment: | |
name: production | |
url: "https://laniakeabooks.org/" | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Install Zola | |
run: sudo snap install --edge zola | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Build website | |
run: zola build | |
- name: Configure SSH | |
run: | | |
mkdir -p ~/.ssh/ | |
echo "$SSH_KEY" > ~/.ssh/server.key | |
chmod 600 ~/.ssh/server.key | |
cat >> ~/.ssh/config << EOF | |
Host laniakea | |
HostName laniakeabooks.org | |
User deploy | |
IdentityFile ~/.ssh/server.key | |
StrictHostKeyChecking no | |
EOF | |
env: | |
SSH_KEY: ${{ secrets.SSH_KEY }} | |
- name: Sync changes | |
run: rsync -avz --progress --delete public/ laniakea:/var/www/laniakea | |
- name: Reload server | |
run: ssh laniakea 'sudo systemctl reload caddy' |