2022-01-02 22:15:41 +01:00
|
|
|
name: Deploy Unstable Manual
|
2021-11-18 07:21:00 +01:00
|
|
|
|
|
|
|
on:
|
2021-12-05 10:30:17 +01:00
|
|
|
workflow_run:
|
|
|
|
workflows:
|
|
|
|
- Build
|
2021-11-18 07:21:00 +01:00
|
|
|
branches:
|
|
|
|
- main
|
2021-12-05 10:30:17 +01:00
|
|
|
types:
|
|
|
|
- completed
|
2021-11-18 07:21:00 +01:00
|
|
|
jobs:
|
2021-11-18 22:15:20 +01:00
|
|
|
deploy-unstable:
|
2022-08-17 04:15:43 +02:00
|
|
|
name: Deploy
|
|
|
|
|
2021-11-18 07:21:00 +01:00
|
|
|
runs-on: ubuntu-latest
|
2022-08-17 04:15:43 +02:00
|
|
|
if: github.repository == 'zhaofengli/colmena'
|
2021-11-18 07:21:00 +01:00
|
|
|
|
|
|
|
steps:
|
2023-01-28 07:44:41 +01:00
|
|
|
- uses: actions/checkout@v3.3.0
|
2022-08-17 04:15:43 +02:00
|
|
|
|
2023-01-28 07:44:41 +01:00
|
|
|
- name: Install Nix
|
2024-11-08 01:42:22 +01:00
|
|
|
uses: DeterminateSystems/nix-installer-action@b92f66560d6f97d6576405a7bae901ab57e72b6a # v15
|
2022-08-17 04:15:43 +02:00
|
|
|
|
2023-01-28 07:44:41 +01: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
|
2021-11-18 07:21:00 +01:00
|
|
|
- name: Build manual
|
2021-12-05 10:14:12 +01:00
|
|
|
run: nix build .#manual -L
|
2021-11-18 07:21:00 +01:00
|
|
|
|
2021-11-18 22:15:20 +01:00
|
|
|
- name: Deploy manual
|
2022-07-30 07:13:09 +02:00
|
|
|
uses: JamesIves/github-pages-deploy-action@v4.3.4
|
2021-11-18 07:21:00 +01:00
|
|
|
with:
|
|
|
|
branch: gh-pages
|
2021-12-05 10:14:12 +01:00
|
|
|
folder: result
|
2021-11-18 07:21:00 +01:00
|
|
|
target-folder: unstable
|
2021-11-18 22:15:20 +01:00
|
|
|
|
|
|
|
# == Redirect Farm
|
|
|
|
# /future_api_version -> /unstable
|
|
|
|
- name: Check future API version
|
2021-11-18 22:23:56 +01:00
|
|
|
run: echo "api_version=$(nix eval .#colmena.apiVersion)" >> $GITHUB_ENV
|
2021-11-18 22:15:20 +01:00
|
|
|
|
|
|
|
- name: Build redirect farm
|
2021-12-05 10:14:12 +01:00
|
|
|
run: nix build .#manual.redirectFarm -L
|
2021-11-18 22:15:20 +01:00
|
|
|
|
|
|
|
- name: Deploy redirect farm
|
2021-12-05 10:14:12 +01:00
|
|
|
uses: JamesIves/github-pages-deploy-action@4.1.6
|
2021-11-18 22:15:20 +01:00
|
|
|
with:
|
|
|
|
branch: gh-pages
|
2021-12-05 10:14:12 +01:00
|
|
|
folder: result-redirectFarm
|
2021-11-18 22:15:20 +01:00
|
|
|
target-folder: '${{ env.api_version }}'
|