2023-10-20 20:53:21 +00:00
|
|
|
name: build-to-pages
|
|
|
|
on: [push]
|
|
|
|
branches: [main]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: docker
|
2023-10-21 18:54:48 +00:00
|
|
|
container:
|
|
|
|
image: klakegg/hugo
|
2023-10-20 20:53:21 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2023-10-21 18:54:48 +00:00
|
|
|
with:
|
|
|
|
submodules: recursive
|
2023-10-20 20:53:21 +00:00
|
|
|
- run: hugo --minify
|
2023-10-21 18:54:48 +00:00
|
|
|
- uses: actions/upload-artifact@v3
|
|
|
|
with:
|
|
|
|
name: hugo-output
|
|
|
|
path: ./public
|
|
|
|
if-no-files-found: error
|
2023-10-20 20:53:21 +00:00
|
|
|
push:
|
2023-10-21 18:54:48 +00:00
|
|
|
runs-on: ubuntu-latest
|
2023-10-20 20:53:21 +00:00
|
|
|
steps:
|
2023-10-21 18:54:48 +00:00
|
|
|
- uses: actions/checkout@v3
|
|
|
|
with:
|
|
|
|
ref: pages
|
|
|
|
- uses: actions/download-artifact@v3
|
|
|
|
with:
|
|
|
|
name: hugo-output
|
|
|
|
- run: ls -l
|
2023-10-20 20:53:21 +00:00
|
|
|
- run: |
|
|
|
|
git config user.name "forgejo-actions"
|
|
|
|
git config user.email ""
|
|
|
|
git add .
|
|
|
|
git commit -m "generated"
|
|
|
|
git push
|