WIP: Rework CI structure and general updates #88
2 changed files with 12 additions and 2 deletions
|
@ -33,13 +33,17 @@ jobs:
|
||||||
with:
|
with:
|
||||||
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
|
||||||
|
uses: ./actions/build-website
|
||||||
|
|
||||||
- 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 +52,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
|
||||||
|
|
7
actions/build-website/action.yml
Normal file
7
actions/build-website/action.yml
Normal file
|
@ -0,0 +1,7 @@
|
||||||
|
name: Build Website
|
||||||
|
description: Build Website Test
|
||||||
|
|
||||||
|
runs:
|
||||||
|
using: docker
|
||||||
|
image: hugomods/hugo:exts-0.148.1
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue