Skip to content

Merge pull request #130 from PierreBeucher/funding.json #60

Merge pull request #130 from PierreBeucher/funding.json

Merge pull request #130 from PierreBeucher/funding.json #60

Workflow file for this run

name: Doc build & publish
on:
push:
branches:
- main
jobs:
build-doc:
name: build doc
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
# cache
- uses: cachix/install-nix-action@v20
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v12
with:
name: novops
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- uses: actions/cache@v3
with:
path: |
~/.cargo/bin/
~/.cargo/registry/index/
~/.cargo/registry/cache/
~/.cargo/git/db/
target/
key: ${{ runner.os }}-${{ runner.arch }}-cargo
- name: Setup Pages # Useful? Not sure
uses: actions/configure-pages@v3
- run: nix develop -c task doc
- name: Upload mdBook artifact
uses: actions/upload-pages-artifact@v1
with:
path: ./docs/book
# Deploy doc from main branch
publish-doc:
name: publish doc
permissions:
contents: read
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build-doc
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2