fix: sync-silo-docs workflow to run on docs runner
Some checks failed
Build and Test / build (pull_request) Has been cancelled
Some checks failed
Build and Test / build (pull_request) Has been cancelled
- Change runs-on from ubuntu-latest to docs - Use internal gitea:3000 URLs for clone and push - Remove unnecessary apt-get/CA cert steps (docs runner has access) - Fix push to use authenticated URL via RELEASE_TOKEN
This commit is contained in:
@@ -7,28 +7,23 @@ on:
|
||||
|
||||
jobs:
|
||||
sync:
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
env:
|
||||
DEBIAN_FRONTEND: noninteractive
|
||||
runs-on: docs
|
||||
|
||||
steps:
|
||||
- name: Trust Cloudflare origin CA
|
||||
run: |
|
||||
apt-get update -qq
|
||||
apt-get install -y --no-install-recommends ca-certificates git
|
||||
update-ca-certificates
|
||||
|
||||
- name: Checkout create repo
|
||||
uses: https://git.kindred-systems.com/actions/checkout.git@v4
|
||||
with:
|
||||
fetch-depth: 1
|
||||
token: ${{ secrets.RELEASE_TOKEN }}
|
||||
run: |
|
||||
REPO_URL="http://gitea:3000/kindred/create.git"
|
||||
if [ -d .git ]; then
|
||||
git fetch "$REPO_URL" main
|
||||
git checkout -f FETCH_HEAD
|
||||
else
|
||||
git clone --depth 1 --branch main "$REPO_URL" .
|
||||
fi
|
||||
|
||||
- name: Clone Silo server docs
|
||||
run: |
|
||||
git clone --depth 1 --filter=blob:none --sparse \
|
||||
https://git.kindred-systems.com/kindred/silo.git /tmp/silo
|
||||
http://gitea:3000/kindred/silo.git /tmp/silo
|
||||
cd /tmp/silo
|
||||
git sparse-checkout set docs README.md ROADMAP.md frontend-spec.md
|
||||
|
||||
@@ -59,4 +54,5 @@ jobs:
|
||||
git commit -m "docs: sync Silo server documentation
|
||||
|
||||
Auto-synced from kindred/silo main branch."
|
||||
git push origin main
|
||||
PUSH_URL="http://kindred-bot:${{ secrets.RELEASE_TOKEN }}@gitea:3000/kindred/create.git"
|
||||
git push "$PUSH_URL" HEAD:main
|
||||
|
||||
Reference in New Issue
Block a user