Skip to content

Commit 213a252

Browse files
committed
ci: pass deploy token via env and set remote url explicitly before push
1 parent 000c765 commit 213a252

1 file changed

Lines changed: 4 additions & 1 deletion

File tree

‎.github/workflows/deploy-pages.yml‎

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,12 +31,15 @@ jobs:
3131
run: npm run build
3232

3333
- name: Deploy to falconlang.github.io
34+
env:
35+
TOKEN: ${{ secrets.PAGES_DEPLOY_TOKEN }}
3436
run: |
35-
git clone https://x-access-token:${{ secrets.PAGES_DEPLOY_TOKEN }}@github.com/falconlang/falconlang.github.io.git _site
37+
git clone https://x-access-token:${TOKEN}@github.com/falconlang/falconlang.github.io.git _site
3638
rsync -a --delete tensor/dist/ _site/
3739
cd _site
3840
git config user.email "action@github.com"
3941
git config user.name "GitHub Actions"
42+
git remote set-url origin https://x-access-token:${TOKEN}@github.com/falconlang/falconlang.github.io.git
4043
git add -A
4144
git diff --cached --quiet || git commit -m "Deploy tensor"
4245
git push

0 commit comments

Comments
 (0)