mirror of
https://github.com/facebook/docusaurus.git
synced 2025-07-30 23:08:54 +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
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: '12.x'
|
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
|
npm ci
|
||||||
|
else
|
||||||
|
npm i
|
||||||
|
fi
|
||||||
npm run build
|
npm run build
|
||||||
gh-release:
|
gh-release:
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
|
@ -145,8 +152,15 @@ jobs:
|
||||||
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"
|
||||||
|
if [ -e yarn.lock ]; then
|
||||||
|
yarn install --frozen-lockfile
|
||||||
|
elif [ -e package-lock.json ]; then
|
||||||
npm ci
|
npm ci
|
||||||
|
else
|
||||||
|
npm i
|
||||||
|
fi
|
||||||
npx docusaurus deploy
|
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.
|
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