2022-07-30 14:30:57 +00:00
|
|
|
name: Docs
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
2023-03-28 23:54:14 +00:00
|
|
|
build:
|
|
|
|
name: Build
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
contents: read
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Install Nix
|
|
|
|
uses: cachix/install-nix-action@v19
|
|
|
|
|
|
|
|
- name: Checkout repository
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Build docs
|
|
|
|
run: nix -L build .#docs
|
|
|
|
|
|
|
|
- name: Prepare docs for upload
|
|
|
|
run: cp -r --dereference --no-preserve=mode,ownership result/ public/
|
|
|
|
|
|
|
|
- name: Upload artifact
|
|
|
|
uses: actions/upload-pages-artifact@v1
|
|
|
|
with:
|
|
|
|
path: public/
|
|
|
|
|
|
|
|
deploy:
|
|
|
|
name: Deploy
|
|
|
|
|
|
|
|
needs: build
|
|
|
|
|
|
|
|
permissions:
|
|
|
|
pages: write
|
|
|
|
id-token: write
|
|
|
|
|
|
|
|
environment:
|
|
|
|
name: github-pages
|
|
|
|
url: ${{ steps.deployment.outputs.page_url }}
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- name: Deploy docs to GitHub Pages
|
|
|
|
id: deployment
|
|
|
|
uses: actions/deploy-pages@v1
|