Compare commits

...

6 commits

Author SHA1 Message Date
ffa2f2ed6c
Update .forgejo/workflows/deploy.yaml
All checks were successful
deploy blog / deploy (push) Successful in 1m6s
2026-02-15 20:16:45 +01:00
c16196e01f
Delete layouts/shortcodes/icon.html 2026-02-15 20:16:45 +01:00
32a7ad14f1
Add layouts/shortcodes/icon.html 2026-02-15 20:16:45 +01:00
e6de2cd933
Update content/post/2025-dg-call-for-action/index.md 2026-02-15 20:16:45 +01:00
73b27d6bae
Update requirements.txt 2026-02-15 20:16:45 +01:00
550013a8ff
Add .forgejo/workflows/deploy.yaml
Signed-off-by: xengi <cccb-git@xengi.de>
2026-02-15 20:16:30 +01:00
3 changed files with 54 additions and 1 deletions

View file

@ -0,0 +1,52 @@
name: deploy blog
on:
workflow_dispatch:
push:
branches:
- staging
- production
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Install dependencies
run: apk --no-cache add hugo python3 py3-pip git openssh-client rsync
- name: Check versions
run: |
cat /etc/os-release
git version
hugo version
python --version
- name: Checkout repository
run: |
git clone -b ${{ forgejo.ref_name }} --recursive https://git.berlin.ccc.de/cccb-website-team/www.git .
git status
- name: Install Python depenndencies
run: python -m pip install -r requirements.txt --break-system-packages
- name: Render site
run: ./build.sh
- name: Setup SSH
env:
SSH_PRIVATE_KEY: ${{ forgejo.ref_name == 'production' && secrets.SSH_PRIVATE_KEY_PRODUCTION || secrets.SSH_PRIVATE_KEY_STAGING }}
run: |
mkdir -p ~/.ssh
printf "%s" "${{ secrets.KNOWN_HOSTS }}" | base64 -d > ~/.ssh/known_hosts
printf "%s" "$SSH_PRIVATE_KEY" | 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
env:
DEPLOY_DIR: ${{ forgejo.ref_name == 'production' && '/srv/http/www/' || '/srv/http/www-staging/' }}
run: rsync -var -e 'ssh -i ~/.ssh/id_ed25519 -o StrictHostKeyChecking=yes' ./public/ deploy@www.berlin.ccc.de:$DEPLOY_DIR
- name: Cleanup
if: ${{ always() }}
run: rm -rf ~/.ssh

View file

@ -22,7 +22,7 @@ _Talks in German and English are welcome!_
**Kontakt / Contact:**
<!-- {{< icon "email" >}} **E-Mail:** datengarten-team@berlin.ccc.de -->
<!-- {{< icon "envelope" >}} **E-Mail:** datengarten-team@berlin.ccc.de -->
{{< icon "mastodon" >}} **Mastodon-DM:** https://chaos.social/@clubdiscordia

View file

@ -1 +1,2 @@
icalendar==5.0.7
pytz