Skip to content

Commit 2332ddc

Browse files
committed
test
1 parent 022a88e commit 2332ddc

1 file changed

Lines changed: 17 additions & 0 deletions

File tree

.github/workflows/deploy.yml

Lines changed: 17 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
uses: actions/checkout@v2
1616
with:
1717
token: ${{ secrets.GITHUB_TOKEN }}
18+
fetch-depth: 0
1819

1920
- name: Use Node 12.x
2021
uses: actions/setup-node@v1
@@ -38,10 +39,26 @@ jobs:
3839
# Create .nojekyll to bypass Jekyll processing
3940
touch deploy/.nojekyll
4041
42+
- name: Configure Git
43+
run: |
44+
git config --global user.name "GitHub Actions Bot"
45+
git config --global user.email "actions@github.com"
46+
47+
- name: Force Push to gh-pages
48+
run: |
49+
git fetch origin gh-pages
50+
git checkout gh-pages
51+
git pull origin gh-pages
52+
git add .
53+
git commit -m "Sync with main branch"
54+
git push origin gh-pages --force
55+
4156
- name: Deploy to GitHub Pages
4257
uses: JamesIves/github-pages-deploy-action@v4
4358
with:
4459
folder: deploy
4560
branch: gh-pages
4661
clean: true
4762
token: ${{ secrets.GITHUB_TOKEN }}
63+
commit-message: "Deploy from main branch"
64+

0 commit comments

Comments
 (0)