41 lines
1,015 B
YAML
41 lines
1,015 B
YAML
name: Build docs site
|
|
permissions:
|
|
contents: write
|
|
issues: write
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
jobs:
|
|
build-app:
|
|
name: Build site
|
|
runs-on: ubuntu-latest
|
|
env:
|
|
TESTING: true
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- uses: actions/setup-node@v2
|
|
with:
|
|
node-version: '16.7.0'
|
|
cache: 'yarn'
|
|
- name: Install dependencies
|
|
run: yarn install
|
|
- name: Config git
|
|
run: |
|
|
git config user.name github-actions
|
|
git config user.email github-actions@github.com
|
|
- name: Build docs
|
|
run: yarn build:docs
|
|
- name: Create issue on fail
|
|
uses: JasonEtco/create-an-issue@v2
|
|
if: ${{ failure() }}
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
with:
|
|
filename: .github/COMMIT_ERROR_ISSUE_TEMPLATE.md
|
|
- name: Commit docs
|
|
if: ${{ success() }}
|
|
run: |
|
|
git add .
|
|
git commit -m "build docs"
|
|
git push origin
|