From c97fd9f1d75fc76fc77b120cc82f1ccb59d7defb Mon Sep 17 00:00:00 2001 From: Anshul Goyal <32068075+anshulrgoyal@users.noreply.github.com> Date: Tue, 9 Jun 2020 13:59:55 +0530 Subject: [PATCH] docs(v2): fix GitHub action workflow in documentation (#2910) --- website/docs/deployment.md | 16 +++++++++++++++- 1 file changed, 15 insertions(+), 1 deletion(-) diff --git a/website/docs/deployment.md b/website/docs/deployment.md index 50f58f9e6c..f53e3563a6 100644 --- a/website/docs/deployment.md +++ b/website/docs/deployment.md @@ -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.