55 - main
66 - pages
77
8+ env :
9+ PAGES_ORGANIZATION : ${{ secrets.PAGES_ORGANIZATION }}
10+ PAGES_REPOSITORY : ${{ secrets.PAGES_REPOSITORY }}
11+ PAGES_ACCESS_TOKEN : ${{ secrets.PAGES_ACCESS_TOKEN }}
12+
813jobs :
914 gh-pages :
1015 runs-on : ubuntu-latest
@@ -17,14 +22,14 @@ jobs:
1722 sudo gem install bundler
1823 bundle install
1924
20- - name : π default org
21- if : env.PAGES_ORGANIZATION == ''
22- run : echo "PAGES_ORGANIZATION=clarius" >> $GITHUB_ENV
23-
2425 - name : π default repo
25- if : env.PAGES_REPOSITORY == ''
26+ if : ${{ env.PAGES_REPOSITORY }} == ''
2627 run : echo "PAGES_REPOSITORY=${GITHUB_REPOSITORY#*/}" >> $GITHUB_ENV
2728
29+ - name : π default token
30+ if : env.PAGES_ACCESS_TOKEN == ''
31+ run : echo "PAGES_ACCESS_TOKEN=${{ secrets.GITHUB_TOKEN }}" >> $GITHUB_ENV
32+
2833 - name : π build
2934 run : bundle exec jekyll build -b ${{ env.PAGES_REPOSITORY }}
3035 env :
@@ -35,14 +40,14 @@ jobs:
3540 cd _site
3641 git init
3742 git add -A
38- git config --local user.email "[email protected] " 39- git config --local user.name "GitHub Action "
43+ git config --local user.email "[email protected] " 44+ git config --local user.name "[email protected] " 4045 git commit -m "Publish pages from ${GITHUB_REPOSITORY}@${GITHUB_SHA:0:9}"
4146
4247 - name : π push
43484449 with :
45- github_token : ${{ secrets .PAGES_ACCESS_TOKEN }}
50+ github_token : ${{ env .PAGES_ACCESS_TOKEN }}
4651 repository : ${{ env.PAGES_ORGANIZATION }}/${{ env.PAGES_REPOSITORY }}
4752 branch : gh-pages
4853 force : true
0 commit comments