File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 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+
You can’t perform that action at this time.
0 commit comments