34 lines
No EOL
778 B
YAML
34 lines
No EOL
778 B
YAML
name: build-to-pages
|
|
on: [push]
|
|
branches: [main]
|
|
jobs:
|
|
build:
|
|
runs-on: docker
|
|
container:
|
|
image: klakegg/hugo
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
submodules: recursive
|
|
- run: hugo --minify
|
|
- uses: actions/upload-artifact@v3
|
|
with:
|
|
name: hugo-output
|
|
path: ./public
|
|
if-no-files-found: error
|
|
push:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
with:
|
|
ref: pages
|
|
- uses: actions/download-artifact@v3
|
|
with:
|
|
name: hugo-output
|
|
- run: ls -l
|
|
- run: |
|
|
git config user.name "forgejo-actions"
|
|
git config user.email ""
|
|
git add .
|
|
git commit -m "generated"
|
|
git push |