ci: add build site job

This commit is contained in:
Gabriel Arazas 2024-11-10 13:18:25 +08:00
parent c54ffe07b5
commit 0f3a17a802
No known key found for this signature in database
GPG Key ID: 62104B43D00AA360
2 changed files with 36 additions and 0 deletions

32
.github/workflows/site.yml vendored Normal file
View File

@ -0,0 +1,32 @@
name: Deploy documentation site
on:
push:
branches: [master]
jobs:
build-site:
name: Build website
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DeterminateSystems/nix-installer-action@v15
- run: make build
- name: Upload artifact
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: result/
deploy-site:
name: Deploy website
needs: build-site
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

View File

@ -6,6 +6,10 @@ docs-serve:
docs-build:
hugo -s docs/website
.PHONY: build
build:
{ command -v nix >/dev/null && nix build -f docs/ website; } || { nix-build docs/ -A website; }
.PHONY: check
check:
{ command -v nix > /dev/null && nix flake check; } || { nix-build tests -A configs -A lib; }