Skip to content

Commit

Permalink
.github: Use actions/deploy-pages to deploy docs
Browse files Browse the repository at this point in the history
  • Loading branch information
adisbladis committed Nov 19, 2024
1 parent a407647 commit 1fb95f4
Showing 1 changed file with 26 additions and 17 deletions.
43 changes: 26 additions & 17 deletions .github/workflows/nix-github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -91,24 +91,33 @@ jobs:
steps:
- run: true

build-pages:
runs-on: ubuntu-latest
needs: collect
steps:
- uses: cachix/install-nix-action@v30
with:
nix_path: nixpkgs=channel:nixos-unstable
- uses: cachix/cachix-action@v15
with:
name: adisbladis
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- uses: actions/[email protected]
- name: Run build
run: nix build -L '.#doc'
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./result

deploy-pages:
if: github.ref == 'refs/heads/master'
needs: build-pages
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: collect
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v30
with:
github_access_token: ${{ secrets.GITHUB_TOKEN }}
- uses: cachix/cachix-action@v15
with:
name: adisbladis
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Run build
run: nix build -L .#doc
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./result
force_orphan: true
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4

0 comments on commit 1fb95f4

Please sign in to comment.