forked from DGNum/colmena
54 lines
1.3 KiB
YAML
54 lines
1.3 KiB
YAML
name: Deploy Unstable Manual
|
|
|
|
on:
|
|
workflow_run:
|
|
workflows:
|
|
- Build
|
|
branches:
|
|
- main
|
|
types:
|
|
- completed
|
|
jobs:
|
|
deploy-unstable:
|
|
name: Deploy
|
|
|
|
runs-on: ubuntu-latest
|
|
if: github.repository == 'zhaofengli/colmena'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v3.3.0
|
|
|
|
- name: Install Nix
|
|
uses: DeterminateSystems/nix-installer-action@9b252454a8d70586c4ee7f163bf4bb1e9de3d763 # v2
|
|
|
|
- name: Enable Binary Cache
|
|
uses: cachix/cachix-action@v12
|
|
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 }}'
|