Deploy Unstable Manual #182
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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/[email protected] | |
- name: Install Nix | |
uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a # v15 | |
- name: Enable Binary Cache | |
uses: cachix/cachix-action@v15 | |
with: | |
name: colmena | |
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}' | |
# == Manual | |
- name: Build manual | |
run: nix build .#manual -L | |
- name: Deploy manual | |
uses: JamesIves/[email protected] | |
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/[email protected] | |
with: | |
branch: gh-pages | |
folder: result-redirectFarm | |
target-folder: '${{ env.api_version }}' |