Skip to content

Merge pull request #122 from numtide/renovate/lock-file-maintenance #23

Merge pull request #122 from numtide/renovate/lock-file-maintenance

Merge pull request #122 from numtide/renovate/lock-file-maintenance #23

Workflow file for this run

name: Deploy docs
on:
push:
branches:
- main
tags:
- "v*"
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
deploy:
runs-on: ubuntu-24.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: cachix/install-nix-action@V27
with:
extra_nix_config: |
accept-flake-config = true
experimental-features = nix-command flakes
- name: Configure Git user
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "github-actions[bot]"
- name: Deploy main
if: ${{ github.ref_name == 'main' }}
run: |
nix develop .#docs --command bash -c "mike deploy -p -u main"
- name: Deploy version
if: startsWith(github.ref, 'refs/tags/v')
run: |
REF_NAME=${{ github.ref_name }}
MAJOR_MINOR=${REF_NAME%.*}
# strip the leading v from the ref_name
# update the latest alias
nix develop .#docs --command bash -c "mike deploy -p -u ${MAJOR_MINOR} latest"