chore: update dependencies and improve wiki update process
CD / update-wiki (push) Successful in 11s
quality / commitlint (push) Skipped
quality / changes (push) Successful in 9s
quality / docker-check (push) Skipped
quality / web (push) Successful in 1m34s
quality / api (push) Successful in 1m4s
CD / quality (push) Successful in 2m52s
CD / publish (push) Successful in 54s
CD / update-wiki (push) Successful in 11s
quality / commitlint (push) Skipped
quality / changes (push) Successful in 9s
quality / docker-check (push) Skipped
quality / web (push) Successful in 1m34s
quality / api (push) Successful in 1m4s
CD / quality (push) Successful in 2m52s
CD / publish (push) Successful in 54s
- Added new dependencies for @tanstack/router-cli and updated related packages in pnpm-lock.yaml. - Modified the build script in package.json to include `tsr generate` for route generation. - Enhanced the wiki update job in Gitea Actions to use a fallback for the GITEA_TOKEN and improved the authorization method for pushing changes. - Updated .dockerignore to clarify generated files. This commit improves the build process and ensures smoother updates to the wiki documentation.
This commit is contained in:
@@ -37,21 +37,35 @@ jobs:
|
||||
else
|
||||
echo "changed=true" >> "$GITHUB_OUTPUT"
|
||||
fi
|
||||
- name: Clone Wiki repository
|
||||
if: steps.check_changes.outputs.changed == 'true'
|
||||
run: |
|
||||
WIKI_URL=$(echo "${{ github.server_url }}/${{ github.repository }}.wiki.git" | sed -e "s|://|://gitea-actions:${{ secrets.GITEA_TOKEN }}@|")
|
||||
git clone "${WIKI_URL}" cfdm.wiki
|
||||
- name: Update and push Wiki content
|
||||
if: steps.check_changes.outputs.changed == 'true'
|
||||
env:
|
||||
WIKI_TOKEN: ${{ secrets.GITEA_TOKEN || secrets.ACTIONS_PAT }}
|
||||
SERVER_URL: ${{ gitea.server_url }}
|
||||
REPO: ${{ gitea.repository }}
|
||||
run: |
|
||||
set -euo pipefail
|
||||
if [ -z "${WIKI_TOKEN:-}" ]; then
|
||||
echo "GITEA_TOKEN / ACTIONS_PAT is empty — cannot push wiki"
|
||||
exit 1
|
||||
fi
|
||||
# runner GITEA_INSTANCE_URL часто внутренний (http://192.168.x.x:3000).
|
||||
# git после clone вырезает userinfo из origin → push без токена даёт 404
|
||||
# «Repository not found». Authorization header переживает insteadOf/sanitize.
|
||||
WIKI_URL="${SERVER_URL}/${REPO}.wiki.git"
|
||||
AUTH_HEADER="Authorization: Basic $(printf '%s' "oauth2:${WIKI_TOKEN}" | base64 | tr -d '\n')"
|
||||
git -c http.extraHeader="${AUTH_HEADER}" clone "${WIKI_URL}" cfdm.wiki
|
||||
cp docs/Home.md cfdm.wiki/Home.md
|
||||
cd cfdm.wiki
|
||||
git config user.name "Gitea Actions"
|
||||
git config user.email "actions@gitea"
|
||||
git add Home.md
|
||||
git diff --staged --quiet || git commit -m "docs: Update Wiki from main repository"
|
||||
git push
|
||||
if git diff --staged --quiet; then
|
||||
echo "Wiki Home.md already up to date"
|
||||
exit 0
|
||||
fi
|
||||
git commit -m "docs: Update Wiki from main repository"
|
||||
git -c http.extraHeader="${AUTH_HEADER}" push origin HEAD
|
||||
|
||||
publish:
|
||||
needs: [quality]
|
||||
|
||||
Reference in New Issue
Block a user