CI publish workflow
Some checks failed
Build website / build-and-deploy (push) Failing after 15s

This commit is contained in:
2025-12-31 23:32:39 +01:00
parent f575d22cb5
commit a25894bf70

View File

@@ -0,0 +1,34 @@
name: Build website
on:
push:
branches:
- master
jobs:
build-and-deploy:
runs-on: ubuntu-latest
container:
image: jbake/jbake:latest
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Build website
run: |
jbake -b
- name: Deploy
env:
SSH_KEY: ${{ secrets.DEPLOY_SSH_KEY }}
REMOTE_IP: ${{ vars.DEPLOY_REMOTE_IP }}
run: |
mkdir -p ~/.ssh
echo "$SSH_KEY" > ~/.ssh/id_rsa
chmod 600 ~/.ssh/id_rsa
ssh-keyscan -H "$REMOTE_IP" >> ~/.ssh/known_hosts
chmod -R 777 output
rsync -az --delete output/ webuser@"$REMOTE_IP":/home/webuser/www/