add forgejo actions workflow for deploying the static website
Some checks failed
/ build (push) Failing after 10s

This commit is contained in:
June 2026-01-25 20:35:33 +01:00
commit 7b17374a5b
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0

View file

@ -0,0 +1,43 @@
on:
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
workflow_dispatch:
env:
TZ: Europe/Berlin
jobs:
build:
runs-on: docker
container:
image: alpine:latest
steps:
- name: Pipeline info
run: |
echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}"
- name: Install packages
run: |
apk update
# For CI actions.
apk add nodejs-current
# For website build.
apk add tzdata coreutils curl jq git
# For uploading.
apk add rsync openssh
- uses: actions/checkout@v4
- name: Deploy - Prepare keys
run: |
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
chmod 400 deploykey.priv
echo "${{ secrets.SSH_KNOWN_HOSTS_FILE }}" > ./known_hosts
cat ./known_hosts
- name: Deploy - Upload to prod
run: |
rsync -v -r --delete -e "ssh -i deploykey.priv -o 'UserKnownHostsFile ./known_hosts'" cpu.ccc.de/ cpuccc-website-deploy@public-web-static-intern.hamburg.ccc.de:/var/www/cpu.ccc.de/