Skip to content

Commit 1513b48

Browse files
Update deploy.yml
1 parent 49b18be commit 1513b48

File tree

1 file changed

+7
-1
lines changed

1 file changed

+7
-1
lines changed

.github/workflows/deploy.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,11 @@ jobs:
5151
git config user.email "github-actions[bot]@users.noreply.github.com"
5252
git add -A
5353
git commit -m "Update registry submodule"
54+
55+
# IMPORTANT: pull latest remote before pushing
56+
git pull --rebase https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git main
57+
58+
# Now push safely without conflict
5459
git push https://x-access-token:${{ secrets.GH_TOKEN }}@github.com/${{ github.repository }}.git HEAD:main
5560
5661
build:
@@ -77,13 +82,14 @@ jobs:
7782
- name: Upload Artifact for Pages
7883
uses: actions/upload-pages-artifact@v3
7984
with:
80-
path: ./dist
85+
path: ./dist
8186

8287
deploy:
8388
needs: build
8489
runs-on: ubuntu-latest
8590
environment:
8691
name: github-pages
92+
8793
steps:
8894
- name: Deploy to GitHub Pages
8995
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)