Skip to content

Commit cedf748

Browse files
committed
ci: fix 403 on Edgheog docs push
staple-actions configures a global git insteadOf rewrite during mix deps.get, converting GitHub SSH/HTTPS remotes to HTTPS with github.token credentials. That makes the final docs push use the actions token instead of the deploy key and fail with 403. Remove the rewrite before push and reset origin to the SSH remote so the deploy key is used. Signed-off-by: Luca Zaninotto <luca.zaninotto@secomind.com>
1 parent 32e3bfb commit cedf748

1 file changed

Lines changed: 3 additions & 3 deletions

File tree

.github/workflows/docs-ci.yaml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,6 @@ jobs:
103103
echo "${{ secrets.publish-key }}" | ssh-add -
104104
mkdir -p ~/.ssh/
105105
ssh-keyscan github.com >> ~/.ssh/known_hosts
106-
git remote add topush "git@github.com:edgehog-device-manager/docs.git"
107-
git fetch topush
108-
git push topush main
106+
git config --global --unset-all url."https://${{ github.token }}:x-oauth-basic@github.com/".insteadOf || true
107+
git remote set-url origin git@github.com:edgehog-device-manager/docs.git
108+
git push origin main

0 commit comments

Comments
 (0)