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+
2+ name : publish-ghpages
3+
4+ on :
5+ workflow_dispatch :
6+ push :
7+ branches :
8+ - ' *'
9+
10+ jobs :
11+ publish :
12+ runs-on : ubuntu-latest
13+ steps :
14+ # Do NOT checkout this. It is a kernel tree and takes a long time, and it's not necessary.
15+ - name : Grab README.md
16+ env :
17+ BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
18+ run : |
19+ curl -s https://raw.githubusercontent.com/${{ github.repository }}/${BRANCH_NAME}/README.md > README.md
20+ ls -la README.md
21+
22+ # install grip via pip, https://github.com/joeyespo/grip; rpardini's fork https://github.com/rpardini/grip
23+ - name : Install grip
24+ run : |
25+ pip3 install https://github.com/rpardini/grip/archive/refs/heads/master.tar.gz
26+
27+ - name : Run grip to gen ${{ github.head_ref || github.ref_name }}
28+ env :
29+ BRANCH_NAME : ${{ github.head_ref || github.ref_name }}
30+ run : |
31+ mkdir -p public
32+ grip README.md --context=${{ github.repository }} --title="${BRANCH_NAME}" --wide --user-content --export "public/${BRANCH_NAME}.html" || true
33+ ls -la public/
34+
35+ - name : Deploy to GitHub Pages (gh-pages branch)
36+ if : success()
37+ uses : crazy-max/ghaction-github-pages@v3
38+ with :
39+ target_branch : gh-pages
40+ build_dir : public
41+ keep_history : true
42+ jekyll : false
43+ env :
44+ GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
You can’t perform that action at this time.
0 commit comments