File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -3,24 +3,23 @@ name: Build Docs
33on :
44 repository_dispatch :
55 types : [docs-updated]
6+ workflow_dispatch :
67
78jobs :
89 build :
910 runs-on : ubuntu-latest
11+ permissions :
12+ contents : write
1013 steps :
1114 - uses : actions/checkout@v4
1215
1316 - name : Fetch latest docs from source repo
14- env :
15- PAT : ${{ secrets.SOURCE_REPO_PAT }}
1617 run : |
17- REPO="https://github.com/YOUR_USERNAME/YOUR_SOURCE_REPO.git"
18- if [ -n "$PAT" ]; then
19- REPO="https://x-access-token:${PAT}@github.com/YOUR_USERNAME/YOUR_SOURCE_REPO.git"
20- fi
21- git clone --depth 1 --branch main "$REPO" /tmp/source
18+ git clone --depth 1 --branch main \
19+ https://github.com/ravindu644/Droidspaces-OSS.git /tmp/source
2220 rm -rf docs/content/
23- cp -r /tmp/source/docs/content docs/content/
21+ mkdir -p docs/content
22+ cp -r /tmp/source/Documentation/. docs/content/
2423
2524 - name : Build HTML
2625 run : python3 .github/scripts/build-docs.py
3130 - name : Commit and push
3231 run : |
3332 SHA="${{ github.event.client_payload.sha }}"
33+ if [ -z "$SHA" ]; then
34+ SHA=$(git -C /tmp/source rev-parse HEAD)
35+ fi
3436 git config user.name "docs-bot"
3537 git config user.email "bot@droidspaces.org"
38+ git remote set-url origin \
39+ https://x-access-token:${{ github.token }}@github.com/${{ github.repository }}.git
3640 git add -A
3741 git diff --cached --quiet || \
3842 git commit -m "docs: update from source@${SHA:0:7}" && \
You can’t perform that action at this time.
0 commit comments