Skip to content

Commit f2846b7

Browse files
Deploy docs via plain git instead of a third-party action
peaceiris/actions-gh-pages isn't in this org's allowed-actions list, causing a startup_failure - use git worktree + push directly instead, no external action needed at all. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
1 parent 6b794ae commit f2846b7

3 files changed

Lines changed: 24 additions & 7 deletions

File tree

‎.github/workflows/npm-release.yml‎

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -61,7 +61,24 @@ jobs:
6161
run: npm run build-docs
6262

6363
- name: Deploy docs
64-
uses: peaceiris/actions-gh-pages@v3
65-
with:
66-
github_token: ${{ secrets.GITHUB_TOKEN }}
67-
publish_dir: ./build
64+
# Publishes build/ to the gh-pages branch directly - avoids depending
65+
# on a third-party action (peaceiris/actions-gh-pages isn't in this
66+
# org's allowed-actions list, which caused a startup_failure).
67+
run: |
68+
git config user.name "github-actions[bot]"
69+
git config user.email "github-actions[bot]@users.noreply.github.com"
70+
71+
worktree=$(mktemp -d)
72+
git fetch origin gh-pages --depth=1
73+
git worktree add "$worktree" gh-pages
74+
75+
rsync -a --delete --exclude=.git build/ "$worktree/"
76+
77+
cd "$worktree"
78+
git add -A
79+
if git diff --cached --quiet; then
80+
echo "No changes to deploy."
81+
else
82+
git commit -m "Deploy docs for ${{ github.ref_name }}"
83+
git push origin gh-pages
84+
fi

‎package-lock.json‎

Lines changed: 2 additions & 2 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

‎package.json‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "@mapbox/mr-ui",
3-
"version": "2.24.4-dev.1",
3+
"version": "2.24.4-dev.2",
44
"description": "UI components for Mapbox projects",
55
"publishConfig": {
66
"access": "public"

0 commit comments

Comments
 (0)