diff --git a/.github/workflows/site.yml b/.github/workflows/site.yml new file mode 100644 index 0000000..a5f08a9 --- /dev/null +++ b/.github/workflows/site.yml @@ -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 diff --git a/Makefile b/Makefile index 99b8d52..aadd9eb 100644 --- a/Makefile +++ b/Makefile @@ -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; }