Skip to content

Commit 626e0e5

Browse files
committed
fix: Configure git remote URL with token for pushing
- Set remote URL with authentication token after cloning - Ensures push to GitHub Pages repository works correctly - Matches authentication pattern from 'me' project
1 parent 39ffa46 commit 626e0e5

1 file changed

Lines changed: 6 additions & 0 deletions

File tree

scripts/publish-docc-to-github-pages.sh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -160,6 +160,12 @@ else
160160
}
161161
fi
162162
cd "$CLONE_DIR"
163+
164+
# Configure remote URL with token for pushing (if in GitHub Actions)
165+
if [ -n "$GITHUB_ACTIONS" ] && [ -n "$GITHUB_TOKEN" ]; then
166+
echo "Configuring remote URL with authentication..."
167+
git remote set-url origin "https://${GITHUB_USER}:${GITHUB_TOKEN}@github.com/${GITHUB_USER}/${GITHUB_PAGES_REPO}.git"
168+
fi
163169
fi
164170

165171
# Determine the documentation directory

0 commit comments

Comments
 (0)