rose-pine-nix/.github/workflows/update-docs.yml
dependabot[bot] 9699536879
actions: bump cachix/install-nix-action from 25 to 26 (#87)
Bumps [cachix/install-nix-action](https://github.com/cachix/install-nix-action) from 25 to 26.
- [Release notes](https://github.com/cachix/install-nix-action/releases)
- [Commits](https://github.com/cachix/install-nix-action/compare/v25...v26)

---
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>
2024-03-13 18:08:35 -04:00

51 lines
1.2 KiB
YAML

name: Update docs
on:
push:
branches: [main]
paths:
- "modules/home-manager/**"
- "modules/nixos/**"
workflow_dispatch:
jobs:
update:
name: Run update
runs-on: ubuntu-latest
permissions:
contents: write
# we only want this running on our repo
if: github.repository == 'Stonks3141/ctp-nix'
steps:
- uses: actions/checkout@v4
- name: Install Nix
uses: cachix/install-nix-action@v26
- name: Set Git user info
run: |
git config user.name 'github-actions[bot]'
git config user.email 'github-actions[bot]@users.noreply.github.com'
- name: Get short revision
id: rev
run:
echo "rev=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"
- name: Build & update docs
run: |
for module in "nixos" "home-manager"; do
nix build -L --show-trace ./dev#"$module"-doc
cat result > docs/"$module"-options.md
rm result
done
- name: Commit changes
run: |
if ! git diff --color=always --exit-code; then
git commit -am "docs: update for ${{ steps.rev.outputs.rev }}"
git push
fi