fix: resolves a bug with github action trying to push updated docs back to external forks (#763)

This commit is contained in:
Andrea Alberti 2026-02-15 20:51:37 +01:00 committed by GitHub
parent 701657f71b
commit 34a18112e8
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -9,6 +9,8 @@ on:
push:
branches:
- main
paths:
- 'zinit*.zsh'
workflow_dispatch:
jobs:
@ -19,15 +21,16 @@ jobs:
- name: checkout repository
uses: actions/checkout@v6
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
ref: ${{ github.event.pull_request.head.ref || github.ref }}
- name: re-generate documentation
run: |
make doc/container
sudo chown -R "$(id -u):$(id -g)" .
- name: commit changes to the current branch
- name: commit and push updated docs
if: github.event_name != 'pull_request'
uses: EndBug/add-and-commit@v9
with:
add: 'doc'