1
0
Fork 0
mirror of https://codeberg.org/icewind/haze.git synced 2026-10-01 00:34:09 +02:00
haze/.forgejo/workflows/book.yaml
2026-09-20 18:32:22 +02:00

29 lines
829 B
YAML

name: "Book"
on:
push:
branches:
- main
jobs:
preview:
runs-on: nix
env:
SITE_ORIGIN: "${{forge.event.repository.owner.username}}.codeberg.page"
SITE_BASEPATH: "/${{forge.event.repository.name}}/"
steps:
- uses: actions/checkout@v4
- uses: https://codeberg.org/icewind/attic-action@v1
with:
name: link
instance: https://cache.icewind.link
authToken: "${{ secrets.ATTIC_TOKEN }}"
- name: Build
run: |
# git-pages/action doesn't like symlinks
cp -r $(nix build .#haze-book --print-out-paths --no-link) dist
- uses: https://codeberg.org/git-pages/action@v2
with:
site: https://${{ env.SITE_ORIGIN }}${{ env.SITE_BASEPATH }}
token: ${{ forge.token }}
source: dist/