Something went wrong. Try again.
forked from zhaofengli/colmena
Something went wrong. Try again.
123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566# This workflow deploys the user manual for stable releases.# Every release branch publishes the manual for its own API# version, and the /stable redirect farm is updated only when# that version matches .github/latest_stable_api on main.
name: Deploy Stable Manual
on: push: branches: - 'release-*'jobs: deploy: name: Deploy
runs-on: ubuntu-latest if: github.repository == 'nix-community/colmena'
permissions: contents: write
steps: - uses: actions/checkout@v7.0.1
- name: Install Nix uses: DeterminateSystems/nix-installer-action@3138316df39ed29be04236d7ffc686fa525866aa # v23 continue-on-error: true # Self-hosted runners already have Nix installed
- name: Enable Binary Cache uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16 with: name: colmena authToken: '${{ secrets.CACHIX_AUTH_TOKEN }}'
- name: Check API version run: echo "api_version=$(nix eval .#colmena.apiVersion | sed 's|\"||g')" >> $GITHUB_ENV
- name: Check latest stable API version run: echo "latest_stable_api=$(curl -L https://raw.githubusercontent.com/nix-community/colmena/main/.github/latest_stable_api)" >> $GITHUB_ENV
# == Manual - name: Build manual run: nix build .#manual -L
- name: Deploy manual uses: JamesIves/github-pages-deploy-action@fa24774553152dd7873cd16ebd8d959b010c5445 # v4.9.0 with: branch: gh-pages folder: result target-folder: '${{ env.api_version }}'
# == Redirect Farm for Latest Stable # /stable -> /api_version
- name: Build redirect farm run: nix build .#manual.redirectFarm -L if: ${{ env.api_version == env.latest_stable_api }}
- name: Deploy redirect farm uses: JamesIves/github-pages-deploy-action@fa24774553152dd7873cd16ebd8d959b010c5445 # v4.9.0 with: branch: gh-pages folder: result-redirectFarm target-folder: stable if: ${{ env.api_version == env.latest_stable_api }}