colmena/.github/workflows/manual.yml
Zhaofeng Li c99a8246c2 .github/manual: Remove github-pages-deploy-action for now
Does not work well with `matrix` et al which causes the actual
job name to change.
2022-08-16 20:16:00 -06:00

57 lines
1.4 KiB
YAML

name: Deploy Unstable Manual
on:
workflow_run:
workflows:
- Build
branches:
- main
types:
- completed
jobs:
deploy-unstable:
runs-on: ubuntu-latest
strategy:
matrix:
nix:
- name: 2.10.3
url: https://releases.nixos.org/nix/nix-2.10.3/install
steps:
- uses: actions/checkout@v3.0.2
- uses: cachix/install-nix-action@v17
with:
install_url: ${{ matrix.nix.url }}
extra_nix_config: |
experimental-features = nix-command flakes
- uses: cachix/cachix-action@v10
with:
name: colmena
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
# == Manual
- name: Build manual
run: nix build .#manual -L
- name: Deploy manual
uses: JamesIves/github-pages-deploy-action@v4.3.4
with:
branch: gh-pages
folder: result
target-folder: unstable
# == Redirect Farm
# /future_api_version -> /unstable
- name: Check future API version
run: echo "api_version=$(nix eval .#colmena.apiVersion)" >> $GITHUB_ENV
- name: Build redirect farm
run: nix build .#manual.redirectFarm -L
- name: Deploy redirect farm
uses: JamesIves/github-pages-deploy-action@4.1.6
with:
branch: gh-pages
folder: result-redirectFarm
target-folder: '${{ env.api_version }}'