colmena/.github/workflows/manual.yml

55 lines
1.3 KiB
YAML
Raw Normal View History

2022-01-02 22:15:41 +01:00
name: Deploy Unstable Manual
on:
workflow_run:
workflows:
- Build
branches:
- main
types:
- completed
jobs:
2021-11-18 22:15:20 +01:00
deploy-unstable:
2022-08-17 04:15:43 +02:00
name: Deploy
runs-on: ubuntu-latest
2022-08-17 04:15:43 +02:00
if: github.repository == 'zhaofengli/colmena'
steps:
- uses: actions/checkout@v3.3.0
2022-08-17 04:15:43 +02:00
- name: Install Nix
uses: DeterminateSystems/nix-installer-action@e1f2e54ff90b012560f19481e250bb7d909f3acd
2022-08-17 04:15:43 +02:00
- name: Enable Binary Cache
uses: cachix/cachix-action@v12
2021-11-18 07:21:00 +01:00
with:
name: colmena
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
2021-11-18 22:15:20 +01:00
# == Manual
- name: Build manual
run: nix build .#manual -L
2021-11-18 22:15:20 +01: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 22:15:20 +01: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 22:15:20 +01:00
- name: Build redirect farm
run: nix build .#manual.redirectFarm -L
2021-11-18 22:15:20 +01:00
- name: Deploy redirect farm
uses: JamesIves/github-pages-deploy-action@4.1.6
2021-11-18 22:15:20 +01:00
with:
branch: gh-pages
folder: result-redirectFarm
2021-11-18 22:15:20 +01:00
target-folder: '${{ env.api_version }}'