ci: simplify docs-build workflow

This commit is contained in:
Matt Sturgeon 2024-06-14 15:27:30 +01:00
parent 3834c4e0db
commit 7a2a25af02
No known key found for this signature in database
GPG key ID: 4F91844CED1A8299
2 changed files with 11 additions and 18 deletions

View file

@ -2,8 +2,10 @@ name: Build and deploy documentation
on: on:
push: push:
# Runs on pushes targeting the default branch # Runs on pushes targeting the release branches
branches: [main] branches:
- main
- nixos-24.05
# Allows you to run this workflow manually from the Actions tab # Allows you to run this workflow manually from the Actions tab
workflow_dispatch: workflow_dispatch:
@ -27,12 +29,6 @@ jobs:
runs-on: ubuntu-latest runs-on: ubuntu-latest
timeout-minutes: 40 timeout-minutes: 40
steps: steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup pages
uses: actions/configure-pages@v5
- name: Install nix - name: Install nix
uses: cachix/install-nix-action@v26 uses: cachix/install-nix-action@v26
with: with:
@ -44,7 +40,13 @@ jobs:
name: nix-community name: nix-community
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- run: ./build-docs.sh - run: |
set -ex
mkdir -p docs-build
nix build github:nix-community/nixvim#docs
cp -r result/share/doc/* docs-build
nix build github:nix-community/nixvim/nixos-24.05#docs
cp -r result/share/doc docs-build/stable
- name: Upload artifact - name: Upload artifact
uses: actions/upload-pages-artifact@v3 uses: actions/upload-pages-artifact@v3

View file

@ -1,9 +0,0 @@
#!/usr/bin/env sh
set -ex
mkdir -p docs-build
nix build github:nix-community/nixvim#docs
cp -r result/share/doc/* docs-build
nix build github:nix-community/nixvim/nixos-24.05#docs
cp -r result/share/doc docs-build/stable