tasty-bdd-0.1.0.2: .github/workflows/deploy-docs.yml
name: Deploy documentation
on:
push:
branches: [master, 'chore/ghc-9.12-modernization']
workflow_dispatch:
permissions:
contents: read
pages: write
id-token: write
concurrency:
group: pages
cancel-in-progress: false
jobs:
build-gate:
name: Docs Build Gate
runs-on: ${{ github.repository_owner == 'lambdasistemi' && 'nixos' || 'ubuntu-latest' }}
steps:
- uses: actions/checkout@v6
- name: Install Nix before organization transfer
if: github.repository_owner != 'lambdasistemi'
uses: paolino/dev-assets/setup-nix@0328b73b71788bb83848fe407dd04136a52c3697
with:
cachix-auth-token: ${{ secrets.CACHIX_AUTH_TOKEN }}
- run: nix build --accept-flake-config .#docs -o result-docs
- name: Stage the site and bind it to the source commit
run: |
mkdir -p site
cp -R -L result-docs/. site/
chmod -R u+w site
echo "$GITHUB_SHA" > site/revision.txt
- uses: actions/upload-pages-artifact@v5
with:
path: site
deploy:
if: github.ref == 'refs/heads/master' || github.ref == 'refs/heads/chore/ghc-9.12-modernization'
needs: build-gate
runs-on: ${{ github.repository_owner == 'lambdasistemi' && 'nixos' || 'ubuntu-latest' }}
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v6
- id: deployment
uses: actions/deploy-pages@v5
- name: Verify the deployed revision and documentation bytes
env:
PAGES_URL: ${{ steps.deployment.outputs.page_url }}
run: nix run --accept-flake-config .#pages-smoke -- "$PAGES_URL" "$GITHUB_SHA"