mirror of
https://github.com/Studio-Saelix/sencho.git
synced 2026-07-26 11:49:16 +00:00
fix(ci): exclude .git from rsync --delete in sync-docs
rsync --delete removes everything in the destination that is absent from the source. sencho/docs/ has no .git directory, so rsync was deleting sencho-docs/.git/ on every run. The commit step then had no git repo to work with, giving 'fatal: not in a git directory'. Fix: add --exclude='.git' to the rsync invocation.
This commit is contained in:
@@ -268,7 +268,9 @@ jobs:
|
||||
fi
|
||||
|
||||
- name: Copy /docs into sencho-docs root
|
||||
run: rsync -av --delete sencho/docs/ sencho-docs/
|
||||
# --exclude='.git' prevents rsync --delete from wiping the .git
|
||||
# directory that was just cloned/initialized in the previous step.
|
||||
run: rsync -av --delete --exclude='.git' sencho/docs/ sencho-docs/
|
||||
|
||||
- name: Commit and push to sencho-docs
|
||||
working-directory: sencho-docs
|
||||
|
||||
@@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||
|
||||
### Fixed
|
||||
- fix(ci): `update-screenshots` — add `pull-requests: write` permission and switch both `actions/checkout` and `peter-evans/create-pull-request` from `GITHUB_TOKEN` to `DOCS_REPO_TOKEN` (PAT with `repo` scope); `GITHUB_TOKEN` is blocked from creating PRs against protected branches
|
||||
- fix(ci): `sync-docs` — add `--exclude='.git'` to the rsync step; `rsync --delete` was deleting the `.git` directory cloned in the previous step because it doesn't exist in the source (`sencho/docs/`), causing `fatal: not in a git directory` in the commit step
|
||||
- fix(ci): `sync-docs` — replace `actions/checkout` + init fallback with a single controlled `git clone || git init` bash step; `actions/checkout@v4` leaves a `.git` in a broken state on empty repos, which the `[ ! -d .git ]` guard missed, causing `fatal: not in a git directory` in the commit step; also drop now-unnecessary `--global safe.directory` config
|
||||
|
||||
### Fixed
|
||||
|
||||
Reference in New Issue
Block a user