.github: Add workflow to build and deploy manual

This commit is contained in:
Zhaofeng Li 2021-11-17 22:21:00 -08:00
parent 4497ef296e
commit b891094b39
2 changed files with 36 additions and 0 deletions

View file

@ -24,12 +24,18 @@ jobs:
- run: nix flake check - run: nix flake check
if: ${{ !contains(matrix.nix.name, '2.3') }} if: ${{ !contains(matrix.nix.name, '2.3') }}
- name: Build Colmena - name: Build Colmena
run: nix build -L run: nix build -L
if: ${{ !contains(matrix.nix.name, '2.3') }} if: ${{ !contains(matrix.nix.name, '2.3') }}
- name: Build Colmena with flake-compat - name: Build Colmena with flake-compat
run: nix-build run: nix-build
- name: Build manual
run: nix build .#manual -L
if: ${{ !contains(matrix.nix.name, '2.3') }}
tests: tests:
runs-on: ubuntu-latest runs-on: ubuntu-latest
strategy: strategy:

30
.github/workflows/manual.yml vendored Normal file
View file

@ -0,0 +1,30 @@
name: Manual
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2.3.5
- uses: cachix/install-nix-action@v15
with:
install_url: https://releases.nixos.org/nix/nix-2.4/install
extra_nix_config: |
experimental-features = nix-command flakes
- name: Build manual
run: nix build -o out .#manual -L
# Ugly hack so it has permission to delete the worktree afterwards
- name: Copy website
run: cp --no-preserve=mode -r out/ public/
- name: Deploy website
uses: JamesIves/github-pages-deploy-action@4.1.5
with:
branch: gh-pages
folder: public
target-folder: unstable