@@ -13,74 +13,83 @@ jobs:
1313 runs-on : ubuntu-latest
1414
1515 steps :
16- # for debugging
17- - name : Print contexts
18- uses : crazy-max/ghaction-dump-context@v1
16+ - name : Debug dump
17+ if : runner.debug == '1'
18+ uses : crazy-max/ghaction-dump-context@v2
1919
2020 - name : Create Pages branch
21- uses : peterjgrainger/action-create-branch@v2.4 .0
21+ uses : peterjgrainger/action-create-branch@v3.0 .0
2222 env :
2323 GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
2424 with :
2525 branch : " gh-pages"
2626
2727 - name : Checkout Pages branch
28- uses : actions/checkout@v3
28+ uses : actions/checkout@v4
2929 with :
3030 ref : gh-pages
3131
32+ - name : SSH debug
33+ if : runner.debug == '1'
34+ uses : mxschmitt/action-tmate@v3
35+
3236 # clean slate, as if starting from orphan branch
3337 - name : Clear Pages branch
34- run : rm -rf * .github .docker .gitignore
38+ run : rm -rf ./ * .github .docker .gitignore
3539
3640 # prevent GitHub from running Jekyll a second time after build
3741 - name : Make .nojekyll file
3842 run : touch .nojekyll
3943
4044 - name : Make placeholder homepage
41- run : echo "Placeholder homepage" > index.html
45+ run : printf "Placeholder homepage" > index.html
4246
4347 - name : Commit changes to Pages branch
44- uses : stefanzweifel/git-auto-commit-action@v4
48+ uses : stefanzweifel/git-auto-commit-action@v5
4549 with :
4650 branch : gh-pages
4751 commit_message : " Clear branch"
4852
4953 - name : Checkout main branch
50- uses : actions/checkout@v3
54+ uses : actions/checkout@v4
5155
5256 - name : Remove files user doesn't need
5357 run : |
5458 rm -rf \
5559 CHANGELOG.md \
5660 testbed.md \
5761 .github/ISSUE_TEMPLATE \
62+ .github/DISCUSSION_TEMPLATE \
5863 .github/workflows/versioning.yaml \
5964 .github/pull_request_template.md \
60-
65+
6166 - name : Rename files
6267 run : |
63- mv .github/user_pull_request_template.md .github/pull_request_template.md
68+ mv -f .github/user_pull_request_template.md .github/pull_request_template.md
6469
6570 - name : Set vars for personalization
6671 run : |
6772 user="${{ github.repository_owner }}"
6873 description="An engaging 1-3 sentence description of your lab."
69- echo "USER=${ user} " >> $GITHUB_ENV
70- echo "DESCRIPTION=${ description} " >> $GITHUB_ENV
74+ printf "\nUSER=%s" "$ user" >> " $GITHUB_ENV"
75+ printf "\nDESCRIPTION=%s" "$ description" >> " $GITHUB_ENV"
7176
7277 - name : Personalize readme for user
7378 run : |
74- echo "
75- # ${{ env.USER }}'s Website
79+ printf "
80+ 
81+ 
82+ 
83+
84+ # %s's Website
7685
77- Visit **[website url](#)** 🚀
86+ Visit **[website url](#)** 🚀
7887
79- _Built with [Lab Website Template](https://greene-lab.gitbook.io/lab-website-template-docs)_
80- " > README.md
88+ _Built with [Lab Website Template](https://greene-lab.gitbook.io/lab-website-template-docs)_
89+ " "${{ env.USER }}" > README.md
8190
8291 - name : Personalize Jekyll config for user
83- uses : actions/github-script@v6
92+ uses : actions/github-script@v7
8493 with :
8594 script : |
8695 const { readFileSync, writeFileSync } = require("fs");
97106 writeFileSync(file, contents);
98107
99108 - name : Personalize homepage for user
100- uses : actions/github-script@v6
109+ uses : actions/github-script@v7
101110 with :
102111 script : |
103112 const { readFileSync, writeFileSync } = require("fs");
@@ -109,6 +118,6 @@ jobs:
109118 writeFileSync(file, contents);
110119
111120 - name : Commit changed files
112- uses : stefanzweifel/git-auto-commit-action@v4
121+ uses : stefanzweifel/git-auto-commit-action@v5
113122 with :
114- commit_message : " Setup repo"
123+ commit_message : " Set up repo"
0 commit comments