Update build-docs.yml
This commit is contained in:
parent
0fc0dc04ae
commit
9eb1f5d04c
23
.github/workflows/build-docs.yml
vendored
23
.github/workflows/build-docs.yml
vendored
@ -1,11 +1,32 @@
|
|||||||
name: Build Documentation
|
name: Build Documentation
|
||||||
|
|
||||||
on:
|
on:
|
||||||
|
pull_request:
|
||||||
|
branches: [main]
|
||||||
push:
|
push:
|
||||||
branches: [main]
|
branches: [main]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
checks:
|
||||||
|
if: github.event_name != 'push'
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v1
|
||||||
|
- uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: '12.x'
|
||||||
|
- name: Test Build
|
||||||
|
run: |
|
||||||
|
if [ -e yarn.lock ]; then
|
||||||
|
yarn install --frozen-lockfile
|
||||||
|
elif [ -e package-lock.json ]; then
|
||||||
|
npm ci
|
||||||
|
else
|
||||||
|
npm i
|
||||||
|
fi
|
||||||
|
npm run build
|
||||||
gh-release:
|
gh-release:
|
||||||
|
if: github.event_name != 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v1
|
- uses: actions/checkout@v1
|
||||||
@ -29,6 +50,8 @@ jobs:
|
|||||||
env:
|
env:
|
||||||
USE_SSH: true
|
USE_SSH: true
|
||||||
GIT_USER: git
|
GIT_USER: git
|
||||||
|
CURRENT_BRANCH: main
|
||||||
|
DEPLOYMENT_BRANCH: gh-pages
|
||||||
run: |
|
run: |
|
||||||
git config --global user.email "actions@gihub.com"
|
git config --global user.email "actions@gihub.com"
|
||||||
git config --global user.name "gh-actions"
|
git config --global user.name "gh-actions"
|
||||||
|
Loading…
Reference in New Issue
Block a user