colmena/.github/workflows/manual.yml

58 lines
1.4 KiB
YAML
Raw Normal View History

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