mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-29 14:38:50 +02:00
docs(v2): fix GitHub action workflow in documentation (#2910)
This commit is contained in:
parent
08359dd3ca
commit
c97fd9f1d7
1 changed files with 15 additions and 1 deletions
|
@ -114,8 +114,15 @@ jobs:
|
|||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '12.x'
|
||||
run: |
|
||||
- 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:
|
||||
if: github.event_name != 'pull_request'
|
||||
|
@ -145,8 +152,15 @@ jobs:
|
|||
run: |
|
||||
git config --global user.email "actions@gihub.com"
|
||||
git config --global user.name "gh-actions"
|
||||
if [ -e yarn.lock ]; then
|
||||
yarn install --frozen-lockfile
|
||||
elif [ -e package-lock.json ]; then
|
||||
npm ci
|
||||
else
|
||||
npm i
|
||||
fi
|
||||
npx docusaurus deploy
|
||||
|
||||
```
|
||||
|
||||
1. Now when a new pull request arrives towards your repository in branch `documentation` it will automatically ensure that Docusaurus build is successful.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue