Skip to content

Commit 040128f

Browse files
committed
Use PAT for docs publish
1 parent 4b4ddac commit 040128f

1 file changed

Lines changed: 7 additions & 1 deletion

File tree

.github/workflows/deploy-python-docs.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -44,6 +44,7 @@ jobs:
4444
with:
4545
fetch-depth: 0 # Full history for mike versioning
4646
token: ${{ secrets.GITHUB_TOKEN }}
47+
persist-credentials: false
4748

4849
- name: Set up Python
4950
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'
@@ -64,7 +65,12 @@ jobs:
6465
run: |
6566
git config user.name "github-actions[bot]"
6667
git config user.email "github-actions[bot]@users.noreply.github.com"
67-
git remote add humemai-docs "https://x-access-token:${{ secrets.HUMEMAI_DOCS_TOKEN }}@github.com/${{ env.DOCS_REPO }}.git"
68+
if [ -z "${{ secrets.HUMEMAI_DOCS_TOKEN }}" ]; then
69+
echo "HUMEMAI_DOCS_TOKEN is missing"
70+
exit 1
71+
fi
72+
git config --global url."https://x-access-token:${{ secrets.HUMEMAI_DOCS_TOKEN }}@github.com/".insteadOf "https://github.com/"
73+
git remote add humemai-docs "https://github.com/${{ env.DOCS_REPO }}.git"
6874
6975
- name: Extract version from tag or input
7076
if: github.event_name == 'workflow_dispatch' || github.event_name == 'push'

0 commit comments

Comments
 (0)