forked from DGNum/colmena
55 lines
1.6 KiB
YAML
55 lines
1.6 KiB
YAML
name: Manual
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
jobs:
|
|
deploy-unstable:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v2.3.5
|
|
- uses: cachix/install-nix-action@v15
|
|
with:
|
|
install_url: https://releases.nixos.org/nix/nix-2.4/install
|
|
extra_nix_config: |
|
|
experimental-features = nix-command flakes
|
|
- uses: cachix/cachix-action@v10
|
|
with:
|
|
name: colmena
|
|
authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
|
|
|
|
# == Manual
|
|
- name: Build manual
|
|
run: nix build -o out .#manual -L
|
|
|
|
# Ugly hack so it has permission to delete the worktree afterwards
|
|
- name: Copy manual
|
|
run: cp --no-preserve=mode -r out/ public/
|
|
|
|
- name: Deploy manual
|
|
uses: JamesIves/github-pages-deploy-action@4.1.5
|
|
with:
|
|
branch: gh-pages
|
|
folder: public
|
|
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 -o out .#manual.redirectFarm -L
|
|
|
|
# Ugly hack so it has permission to delete the worktree afterwards
|
|
- name: Copy redirect farm
|
|
run: cp --no-preserve=mode -r out-redirectFarm/ redirect-farm/
|
|
|
|
- name: Deploy redirect farm
|
|
uses: JamesIves/github-pages-deploy-action@4.1.5
|
|
with:
|
|
branch: gh-pages
|
|
folder: redirect-farm
|
|
target-folder: '${{ env.api_version }}'
|