mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 07:36:38 -04:00
fix: resolves a bug with github action trying to push updated docs back to external forks (#763)
This commit is contained in:
parent
701657f71b
commit
34a18112e8
9
.github/workflows/documentation.yaml
vendored
9
.github/workflows/documentation.yaml
vendored
|
|
@ -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'
|
||||
|
|
|
|||
Loading…
Reference in a new issue