2024-08-28 10:48:01 +00:00
|
|
|
name: build static site
|
|
|
|
|
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
2024-08-28 13:04:51 +00:00
|
|
|
container:
|
|
|
|
image: node:22-bookworm
|
2024-08-28 10:48:01 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v4
|
2024-08-28 14:03:17 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 1
|
2024-08-28 10:48:01 +00:00
|
|
|
|
|
|
|
- uses: actions/cache@v4
|
|
|
|
with:
|
|
|
|
path: |-
|
|
|
|
bin/
|
|
|
|
themes/
|
|
|
|
key: hugo-${{ runner.os }}-${{ hashFiles('Makefile', 'config.toml') }}
|
|
|
|
restore-keys: |
|
|
|
|
hugo-${{ runner.os }}
|
|
|
|
hugo
|
|
|
|
|
2024-08-28 14:03:17 +00:00
|
|
|
- run: |
|
|
|
|
git submodule sync
|
|
|
|
rm -rf themes/dot-hugo
|
|
|
|
make all
|
2024-08-28 10:48:01 +00:00
|
|
|
|
2024-08-28 14:03:17 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
2024-08-28 12:54:10 +00:00
|
|
|
id: artifact-upload-step
|
2024-08-28 10:48:01 +00:00
|
|
|
with:
|
|
|
|
name: site
|
|
|
|
path: |
|
|
|
|
public/
|
|
|
|
if-no-files-found: error
|
|
|
|
retention-days: 10
|
2024-08-28 12:54:10 +00:00
|
|
|
|
|
|
|
- name: Show artifact URL
|
|
|
|
run: |
|
|
|
|
echo 'Download URL: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.artifact-upload-step.outputs.artifact-id }}'
|