Compare commits

...
Author SHA1 Message Date
4e2c358668 Merge pull request 'fu github pipelines' (#51) from staging into production
Some checks failed
deploy blog / deploy (push) Failing after 50s
Reviewed-on: #51
2026-08-11 23:15:28 +02:00
e690426b3f Merge branch 'production' into staging
Some checks failed
deploy blog / deploy (push) Failing after 50s
2026-08-11 23:15:14 +02:00
7689abaf3e Update .forgejo/workflows/deploy.yaml
Some checks failed
deploy blog / deploy (push) Failing after 51s
2026-08-11 23:13:51 +02:00
bafe2bcb81 Update .forgejo/workflows/deploy.yaml
All checks were successful
deploy blog / deploy (push) Successful in 52s
2026-08-11 23:05:26 +02:00
bac896e60f Update .forgejo/workflows/deploy.yaml
All checks were successful
deploy blog / deploy (push) Successful in 51s
2026-08-11 22:57:01 +02:00
87e1230301
unfix pipeline
All checks were successful
deploy blog / deploy (push) Successful in 52s
2026-08-11 22:45:17 +02:00
f839b1b01a Update .forgejo/workflows/deploy.yaml
All checks were successful
deploy blog / deploy (push) Successful in 53s
Signed-off-by: xengi <cccb-git@xengi.de>
2026-08-11 22:37:45 +02:00
2ba5b8cfa8
fix pipeline
Some checks failed
deploy blog / deploy (push) Failing after 54s
2026-08-11 22:29:30 +02:00
96919a7188
fix pipeline
Some checks failed
deploy blog / deploy (push) Failing after 52s
2026-08-11 22:20:30 +02:00
dfae28d575 Update .forgejo/workflows/deploy.yaml
All checks were successful
deploy blog / deploy (push) Successful in 52s
2026-08-11 22:10:47 +02:00
c2a2f6e160 Update .forgejo/workflows/deploy.yaml
All checks were successful
deploy blog / deploy (push) Successful in 55s
2026-08-11 22:07:01 +02:00
d3fd2ec8a7 Update .forgejo/workflows/deploy.yaml
All checks were successful
deploy blog / deploy (push) Successful in 51s
2026-08-11 22:05:43 +02:00
c18cce53f8 Update .forgejo/workflows/deploy.yaml
Some checks failed
deploy blog / deploy (push) Has been cancelled
2026-08-11 22:05:13 +02:00

View file

@ -1,4 +1,5 @@
name: deploy blog
on:
workflow_dispatch:
schedule:
@ -11,7 +12,7 @@ on:
jobs:
deploy:
runs-on: ubuntu-latest
steps:
steps:
- name: Install dependencies
run: apk --no-cache add hugo python3 py3-pip git openssh-client rsync
@ -21,13 +22,12 @@ jobs:
git version
hugo version
python --version
rsync --version
ssh -V
- name: Set envionment vars
run: |
echo "GIT_BRANCH=${{ forgejo.event_name == 'schedule' && 'production' || forgejo.ref_name }}" >> "$FORGEJO_ENV"
echo "SSH_PRIVATE_KEY=${{ env.GIT_BRANCH == 'production' && secrets.SSH_PRIVATE_KEY_PRODUCTION || secrets.SSH_PRIVATE_KEY_STAGING }}" >> "$FORGEJO_ENV"
echo "DEPLOY_DIR=${{ env.GIT_BRANCH == 'production' && '/srv/http/www/' || '/srv/http/www-staging/' }}" >> "$FORGEJO_ENV"
run: echo "GIT_BRANCH=${{ forgejo.event_name == 'schedule' && 'production' || forgejo.ref_name }}" >> "$FORGEJO_ENV"
- name: Checkout repository
run: |
git clone -b $GIT_BRANCH --recursive https://git.berlin.ccc.de/cccb-website-team/www.git .
@ -43,15 +43,15 @@ jobs:
run: |
mkdir -p ~/.ssh
printf "%s" "${{ secrets.KNOWN_HOSTS }}" | base64 -d > ~/.ssh/known_hosts
printf "%s" "$SSH_PRIVATE_KEY" | base64 -d > ~/.ssh/id_ed25519
printf "%s" "${{ env.GIT_BRANCH == 'production' && secrets.SSH_PRIVATE_KEY_PRODUCTION || secrets.SSH_PRIVATE_KEY_STAGING }}" | base64 -d > ~/.ssh/id_ed25519
chmod 600 ~/.ssh/id_ed25519
ssh-keygen -f ~/.ssh/id_ed25519 -y > ~/.ssh/id_ed25519.pub
cat ~/.ssh/id_ed25519.pub
- name: Rsync rendered site
# TODO: add --delete
run: rsync -var -e 'ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes' ./public/ deploy@www.berlin.ccc.de:$DEPLOY_DIR
run: rsync -var --delete -e 'ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes' ./public/ deploy@www.berlin.ccc.de:${{ env.GIT_BRANCH == 'production' && '/srv/http/www/' || '/srv/http/www-staging/' }}
- name: Cleanup
if: ${{ always() }}
run: rm -rf ~/.ssh