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+ name : GitHub Pages
2+ on : workflow_dispatch
3+ jobs :
4+ deploy :
5+ name : Deploy
6+ runs-on : ubuntu-latest
7+ concurrency :
8+ group : ${{ github.workflow }}-${{ github.ref }}
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v2
12+ - name : Setup node
13+ uses : actions/setup-node@v2
14+ with :
15+ node-version : 12
16+ - name : Install
17+ run : npm install
18+ - name : Build
19+ run : npm run build
20+ - name : Deploy
21+ uses : peaceiris/actions-gh-pages@v3
22+ if : ${{ github.ref == 'refs/heads/master' }}
23+ with :
24+ github_token : ${{ secrets.GITHUB_TOKEN }}
25+ publish_dir : ./dist
26+ cname : leveljs.org
Original file line number Diff line number Diff line change @@ -58,15 +58,7 @@ npm start
5858
5959### For maintainers
6060
61- ` npm run deploy ` builds the static site, switches to the gh-pages branch and
62- puts the built site in the root, and then does git push origin gh-pages.
63-
64- ```
65- git fetch
66- git checkout master # if you're not already on it
67- git merge <fork-branch>
68- npm run deploy
69- ```
61+ Manually trigger the GitHub Actions workflow to deploy to gh-pages.
7062
7163## Donate
7264
Original file line number Diff line number Diff line change 1010 "start" : " run-p build-assets watch-styles watch-pug server" ,
1111 "watch-styles" : " stylus -w ./assets/styl/ -o ./dist/css/" ,
1212 "watch-pug" : " pug --watch ./assets/pug/index.pug --out ./dist/" ,
13- "build" : " npm run build-styles && npm run build-pug && npm run build-assets && echo leveljs.org > dist/CNAME " ,
13+ "build" : " npm run build-styles && npm run build-pug && npm run build-assets" ,
1414 "build-styles" : " stylus ./assets/styl/ -o ./dist/css/" ,
1515 "build-pug" : " pug ./assets/pug/index.pug --out ./dist/" ,
1616 "build-assets" : " cpy **/* ../../dist --cwd=assets/static --parents" ,
You can’t perform that action at this time.
0 commit comments