jj/.github/workflows/docs.yml
Austin Seipp 0ee37948de github: narrow perms in the docs workflow
Found by `zizmor`.

Signed-off-by: Austin Seipp <aseipp@pobox.com>
2025-02-14 09:38:49 +00:00

40 lines
1.2 KiB
YAML

name: website
on:
push:
branches:
- main
permissions: {}
jobs:
prerelease-docs-build-deploy:
if: github.repository_owner == 'jj-vcs' # Stops this job from running on forks
strategy:
matrix:
os: [ubuntu-24.04]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683
with:
persist-credentials: false
- run: "git fetch origin gh-pages --depth=1"
- uses: actions/setup-python@42375524e23c412d93fb67b49958b491fce71c38
with:
python-version: 3.11
- name: Install uv
uses: astral-sh/setup-uv@4db96194c378173c656ce18a155ffc14a9fc4355
with:
version: "0.5.1"
- name: Install dependencies, compile and deploy docs
permissions:
contents: write
run: |
git config user.name 'jj-docs[bot]'
git config user.email 'jj-docs[bot]@users.noreply.github.io'
export MKDOCS_SITE_NAME="Jujutsu docs (prerelease)"
export MKDOCS_PRIMARY_COLOR="blue grey"
.github/scripts/docs-build-deploy prerelease --push
- name: "Show `git diff --stat`"
run: git diff --stat gh-pages^ gh-pages || echo "(No diffs)"