Created
September 1, 2024 17:39
-
-
Save adophilus/9997f789c45e66c79d4db8ef7c839ac6 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: docs | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout current repo state | |
uses: actions/checkout@v4 | |
- name: Create output folder | |
run: mkdir __site | |
- name: Install Nix | |
uses: cachix/install-nix-action@v27 | |
- name: Build docs | |
run: | | |
cd docs | |
nix build .#packages.x86_64-linux.docs | |
mkdir ../__site/docs | |
cp -r result/* ../__site/docs/ | |
- name: Check built docs | |
run: | | |
cd docs | |
nix flake check | |
- name: Upload built assets | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./__site | |
retention-days: 90 | |
deploy: | |
needs: build | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment