Compare commits
34 commits
ffa2f2ed6c
...
1eb7df1eb0
| Author | SHA1 | Date | |
|---|---|---|---|
| 1eb7df1eb0 | |||
| c2cbeec0e5 | |||
| 4d20090853 | |||
| 27ef15a13d | |||
| db01cd50b7 | |||
| bc44cc03f6 | |||
| 85b0c78164 | |||
| 216a170219 | |||
| 2f0f720bbf | |||
| 52a09f97e5 | |||
| 92ad2f06f6 | |||
| 33653eb1d5 | |||
| f303d7faba | |||
| c28addaf2e | |||
| 865c896f0d | |||
| faf2dbe95a | |||
| a09f536d49 | |||
| 6a648717b7 | |||
| 2e059ecd21 | |||
| a649617fae | |||
| 4c616c95a0 | |||
| 8a7f18ff1f | |||
| ef0df4877d | |||
| e0cad17e4e | |||
| ca6dc3d16e | |||
| b74d61cc48 | |||
| a4d258384e | |||
| 3fa8bb537d | |||
| 94c189a794 | |||
| ead5a73a57 | |||
| afd638d21b | |||
| 90a0a6e441 | |||
| 3543f391fe | |||
| b1e883a337 |
3 changed files with 54 additions and 1 deletions
52
.forgejo/workflows/deploy.yaml
Normal file
52
.forgejo/workflows/deploy.yaml
Normal 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
|
||||||
|
|
@ -22,7 +22,7 @@ _Talks in German and English are welcome!_
|
||||||
|
|
||||||
**Kontakt / Contact:**
|
**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
|
{{< icon "mastodon" >}} **Mastodon-DM:** https://chaos.social/@clubdiscordia
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -1 +1,2 @@
|
||||||
icalendar==5.0.7
|
icalendar==5.0.7
|
||||||
|
pytz
|
||||||
Loading…
Add table
Add a link
Reference in a new issue