move docs/gh pages into separate workflow

Signed-off-by: strawberry <strawberry@puppygock.gay>
This commit is contained in:
strawberry 2024-03-18 01:30:40 -04:00 committed by June
parent c8c3a9ed43
commit 694b926366
2 changed files with 119 additions and 44 deletions

View file

@ -1,4 +1,4 @@
name: CI, Artifacts, and Documentation
name: CI and Artifacts
on:
pull_request:
@ -23,22 +23,10 @@ env:
permissions:
packages: write
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
jobs:
ci:
name: CI, Artifacts, and Documentation
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
name: CI and Artifacts
runs-on: ubuntu-latest
@ -46,10 +34,6 @@ jobs:
- name: Sync repository
uses: actions/checkout@v4
- name: Setup GitHub Pages
if: github.event_name != 'pull_request'
uses: actions/configure-pages@v4
- name: Install Nix (with flakes and nix-command enabled)
uses: cachix/install-nix-action@v26
with:
@ -177,32 +161,6 @@ jobs:
compression-level: 0
- name: Build documentation (book)
run: |
./bin/nix-build-and-cache .#book
cp -r --dereference result public
- name: Upload generated documentation (book) as normal artifact
uses: actions/upload-artifact@v4
with:
name: public
path: public
if-no-files-found: error
# don't compress again
compression-level: 0
- name: Upload generated documentation (book) as GitHub Pages artifact
if: github.event_name != 'pull_request'
uses: actions/upload-pages-artifact@v3
with:
path: public
- name: Deploy to GitHub Pages
if: github.event_name != 'pull_request'
id: deployment
uses: actions/deploy-pages@v4
- name: Extract metadata for Dockerhub
env:
REGISTRY: registry.hub.docker.com