Compare commits
2 commits
c40ba3de32
...
cb089a6d05
Author | SHA1 | Date | |
---|---|---|---|
cb089a6d05 |
|||
f9f3a82f23 |
1 changed files with 9 additions and 4 deletions
|
@ -10,15 +10,20 @@ env:
|
||||||
TZ: Europe/Berlin
|
TZ: Europe/Berlin
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
pipeline-info:
|
||||||
runs-on: docker
|
runs-on: docker
|
||||||
container:
|
container:
|
||||||
image: hugomods/hugo:exts-0.148.1
|
image: code.forgejo.org/oci/node:22-bookworm
|
||||||
steps:
|
steps:
|
||||||
- name: Pipeline info
|
- name: Pipeline info
|
||||||
run: |
|
run: |
|
||||||
echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}"
|
echo "Run triggered by ${{ github.event_name }} (${{ github.event.action }}) on ref ${{ github.ref_name }}"
|
||||||
|
|
||||||
|
build:
|
||||||
|
runs-on: docker
|
||||||
|
container:
|
||||||
|
image: hugomods/hugo:exts-0.148.1
|
||||||
|
steps:
|
||||||
- name: Install packages
|
- name: Install packages
|
||||||
run: |
|
run: |
|
||||||
apk update
|
apk update
|
||||||
|
@ -34,12 +39,13 @@ jobs:
|
||||||
fetch-depth: 0 # pull full history for page lastmod by git commit date
|
fetch-depth: 0 # pull full history for page lastmod by git commit date
|
||||||
|
|
||||||
- name: Build website - prod
|
- name: Build website - prod
|
||||||
|
if: (github.event_name == 'push' || github.event_name == 'schedule') && github.ref_name == 'main'
|
||||||
run: |
|
run: |
|
||||||
./fetch-calendar.sh
|
./fetch-calendar.sh
|
||||||
hugo
|
hugo
|
||||||
|
|
||||||
- name: Build website - staging
|
- name: Build website - staging
|
||||||
if: github.ref_name != 'main'
|
if: github.event_name == 'pull_request'
|
||||||
run: |
|
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#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
|
sed -i "s#index = true#index = false#" hugo.toml
|
||||||
|
@ -48,7 +54,6 @@ jobs:
|
||||||
hugo --buildFuture
|
hugo --buildFuture
|
||||||
|
|
||||||
- name: Deploy - Prepare keys
|
- name: Deploy - Prepare keys
|
||||||
if: github.event_name == 'push' || github.event_name == 'pull_request' || github.event_name == 'schedule'
|
|
||||||
run: |
|
run: |
|
||||||
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
|
echo "${{ secrets.SSH_DEPLOY_KEY }}" > deploykey.priv
|
||||||
chmod 400 deploykey.priv
|
chmod 400 deploykey.priv
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue