WIP: Rework CI structure and general updates #88

Draft
june wants to merge 2 commits from rework_ci into main
Showing only changes of commit c40ba3de32 - Show all commits

ci: make step conditions more structured
All checks were successful
/ build (pull_request) Successful in 37s

Either have a step always be executed, be executed for prod or be
executed for a PR (staging) and use the same conditions for each of
these cases.
June 2025-07-26 16:11:02 +02:00
Signed by: june
SSH key fingerprint: SHA256:o9EAq4Y9N9K0pBQeBTqhSDrND5E7oB+60ZNx0U1yPe0

View file

@ -34,12 +34,13 @@ jobs:
fetch-depth: 0 # pull full history for page lastmod by git commit date
- name: Build website - prod
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'main'
run: |
./fetch-calendar.sh
hugo
- name: Build website - staging
if: github.ref_name != 'main'
if: github.event_name == 'pull_request'
run: |
sed -i "s#baseURL = 'https://hamburg.ccc.de/'#baseURL = 'https://staging.hamburg.ccc.de/pr${{ github.event.pull_request.number }}/'#" hugo.toml
sed -i "s#index = true#index = false#" hugo.toml
@ -48,7 +49,6 @@ jobs:
hugo --buildFuture
- name: Deploy - Prepare keys
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule'
run: |
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
chmod 400 deploykey.priv