www/.forgejo/workflows/deploy.yaml
xengi a4d258384e
Some checks failed
deploy blog / deploy (push) Failing after 3s
Update .forgejo/workflows/deploy.yaml
Signed-off-by: xengi <cccb-git@xengi.de>
2026-02-15 13:07:35 +01:00

47 lines
1.2 KiB
YAML

name: deploy blog
on:
workflow_dispatch:
push:
branches:
- staging
- production
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- run: |
pwd
ls -la
apk --no-cache add git
git status
exit 1
- name: Install dependencies
run: apk --no-cache add hugo python3 py3-pip
- name: Check install
run: |
hugo version
python --version
- name: Install Python depenndencies
run: python -m pip install -r requirements.txt
- name: Render site
run: ./build.sh
- name: Setup SSH key
run: |
echo ${{ secrets.SSH_PRIVATE_KEY }} > id_ed25519
chmod 600 id_ed25519
- name: Sync rendered site to staging
if: forgejo.ref == 'refs/heads/staging'
run: rsync -var -e 'ssh -i id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www-staging/
continue-on-error: true
- name: Sync rendered site to production
if: forgejo.ref == 'refs/heads/production'
run: rsync -var -e 'ssh -i id_ed25519' ./public/ deploy@www.berlin.ccc.de:srv/http/www/
continue-on-error: true
- name: Cleanup
run: rm -rf id_ed25519