Skip to content

Refactor and v2 API #69

Refactor and v2 API

Refactor and v2 API #69

Workflow file for this run

name: doc
on:
push:
branches:
- master
paths:
- 'docs/**'
- 'modules/**'
pull_request:
paths:
- 'docs/**'
- 'modules/**'
workflow_dispatch:
permissions:
id-token: write
pages: write
contents: write
jobs:
build:
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- name: 📦 Install Nix
uses: cachix/install-nix-action@master
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
extra_nix_config: |
extra-experimental-features = nix-command flakes
- name: 🏗️ Build
run: nix build github:${{ github.repository }}/${{ github.sha }}#docs -L
- name: 📤 Upload artifacts
id: deployment
uses: actions/upload-pages-artifact@v3
with:
path: ./result
deploy:
environment:
name: ${{ github.event_name == 'pull_request' && format('github-pages-pr-{0}', github.event.pull_request.number) || 'github-pages' }}
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: 🚀 Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
with:
preview: ${{ github.event_name == 'pull_request' }}