File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1- # Stamp about.json on gh-pages with the time and commit of every push.
2- # Runs for pushes to master and gh-pages; its own push (as github-actions[bot]
3- # via GITHUB_TOKEN) does not re-trigger workflows, so it cannot loop.
4- name : Update about.json
1+ # Publish the committed web assets and metadata to GitHub Pages.
2+ name : Deploy GitHub Pages
53
64on :
75 push :
8- branches : [master, gh-pages ]
6+ branches : [master]
97
108concurrency :
11- group : update-about
9+ group : deploy-github-pages
1210 cancel-in-progress : false
1311
1412jobs :
15- update-about :
13+ deploy :
1614 runs-on : ubuntu-latest
1715 permissions :
1816 contents : write
1917 steps :
18+ - uses : actions/checkout@v4
19+ with :
20+ ref : ${{ github.sha }}
21+ path : source
22+
2023 - uses : actions/checkout@v4
2124 with :
2225 ref : gh-pages
26+ path : pages
27+
28+ - name : Copy web assets
29+ run : cp -R source/web/. pages/
2330
2431 - name : Stamp about.json
32+ working-directory : pages
2533 run : |
2634 node -e '
2735 const fs = require("fs")
@@ -32,11 +40,12 @@ jobs:
3240 '
3341
3442 - name : Commit and push
43+ working-directory : pages
3544 run : |
3645 git config user.name "github-actions[bot]"
3746 git config user.email "github-actions[bot]@users.noreply.github.com"
38- git add about.json
47+ git add --all
3948 git diff --cached --quiet || {
40- git commit -m "Stamp about.json for ${GITHUB_SHA::7}"
49+ git commit -m "Deploy website for ${GITHUB_SHA::7}"
4150 git push
4251 }
You can’t perform that action at this time.
0 commit comments