Skip to content

geonixcli: migrate to geonix-rolling #155

geonixcli: migrate to geonix-rolling

geonixcli: migrate to geonix-rolling #155

name: Update documentation
on:
pull_request:
push:
branches:
- master
workflow_dispatch:
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run
# in-progress and latest queued. However, do NOT cancel in-progress runs as we
# want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
env:
NIX_CONFIG: "access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}"
jobs:
update-docs:
strategy:
fail-fast: false
runs-on: ubuntu-22.04
steps:
- name: Checkout source code repository
uses: actions/checkout@v4
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Install nix
uses: cachix/install-nix-action@v26
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Update configuration options
run: >
cp
$(nix build --impure --accept-flake-config --no-link --print-out-paths .#documentation)
docs/src/configuration-options.md
- name: Build documentation
run: |
nix develop --impure --accept-flake-config --command mkdocs build
working-directory: docs
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: 'docs/site'
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/master' }}