blob: fb8022fabae86a7b2d8465aef86435027957cfaf [file] [log] [blame]
Derick Montague1bddf792020-10-23 08:20:06 -05001name: Deploy documentation to GitHub pages
2on:
Patrick Williams7385e132022-12-08 06:13:13 -06003 push:
4 branches: [master]
Derick Montague1bddf792020-10-23 08:20:06 -05005jobs:
Patrick Williams7385e132022-12-08 06:13:13 -06006 build:
7 runs-on: ubuntu-latest
Derick Montague1bddf792020-10-23 08:20:06 -05008
Patrick Williams7385e132022-12-08 06:13:13 -06009 steps:
10 - uses: actions/checkout@v2
Derick Montague1bddf792020-10-23 08:20:06 -050011
Patrick Williams7385e132022-12-08 06:13:13 -060012 - name: Generate static vuepress files
13 uses: actions/setup-node@v1
14 with:
15 node-version: "12.x"
16 - run: npm ci
17 - run: npm run docs:build
Derick Montague1bddf792020-10-23 08:20:06 -050018
Patrick Williams7385e132022-12-08 06:13:13 -060019 - name: Init new repo in dist folder and commit generated files
20 run: |
21 cd docs/.vuepress/dist
22 git init
23 git add -A
24 git config --local user.email "action@github.com"
25 git config --local user.name "GitHub Action"
26 git commit -m 'deploy'
Derick Montague1bddf792020-10-23 08:20:06 -050027
Patrick Williams7385e132022-12-08 06:13:13 -060028 - name: Force push to gh-pages branch
29 uses: ad-m/github-push-action@v0.5.0
30 with:
31 github_token: ${{ secrets.GITHUB_TOKEN }}
32 branch: gh-pages
33 force: true
34 directory: ./docs/.vuepress/dist