5cb3e83bdd
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 20 to 23. - [Release notes](https://github.com/cachix/install-nix-action/releases) - [Commits](https://github.com/cachix/install-nix-action/compare/v20...v23) --- updated-dependencies: - dependency-name: cachix/install-nix-action dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
44 lines
1 KiB
YAML
44 lines
1 KiB
YAML
name: Update docs
|
|
|
|
on:
|
|
push:
|
|
paths:
|
|
- "modules/home-manager/**"
|
|
- "modules/nixos/**"
|
|
workflow_dispatch:
|
|
|
|
jobs:
|
|
update-docs:
|
|
runs-on: ubuntu-latest
|
|
|
|
permissions:
|
|
contents: write
|
|
|
|
strategy:
|
|
max-parallel: 1
|
|
matrix:
|
|
package: ["nixos", "home-manager"]
|
|
|
|
# we only want this running on our repo, on the `main` branch
|
|
if: github.repository == 'Stonks3141/ctp-nix' && github.ref_name == 'main'
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: cachix/install-nix-action@v23
|
|
|
|
- name: Get short revision
|
|
id: rev
|
|
run:
|
|
echo "rev=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Build doc
|
|
run: nix build .#${{ matrix.package }}-doc
|
|
|
|
- name: Update doc
|
|
run: cat result > docs/${{ matrix.package }}-options.md
|
|
|
|
- name: Commit changes
|
|
uses: EndBug/add-and-commit@v9
|
|
with:
|
|
default_author: github_actions
|
|
message: "docs: update docs for ${{ steps.rev.outputs.rev }}"
|