Install node_modules in build-docs.yml
This commit is contained in:
parent
c598414930
commit
e7f696112e
40
.github/workflows/build-docs.yml
vendored
40
.github/workflows/build-docs.yml
vendored
@ -15,16 +15,26 @@ jobs:
|
|||||||
- uses: actions/setup-node@v1
|
- uses: actions/setup-node@v1
|
||||||
with:
|
with:
|
||||||
node-version: '12.x'
|
node-version: '12.x'
|
||||||
|
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
- name: Install modules
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
- name: Install modules (example/)
|
||||||
|
run: yarn example --frozen-lockfile
|
||||||
|
|
||||||
- name: Test Build
|
- name: Test Build
|
||||||
run: |
|
run: |
|
||||||
if [ -e yarn.lock ]; then
|
|
||||||
yarn install --frozen-lockfile
|
yarn install --frozen-lockfile
|
||||||
elif [ -e package-lock.json ]; then
|
yarn build
|
||||||
npm ci
|
|
||||||
else
|
|
||||||
npm i
|
|
||||||
fi
|
|
||||||
npm run build
|
|
||||||
gh-release:
|
gh-release:
|
||||||
if: github.event_name != 'pull_request'
|
if: github.event_name != 'pull_request'
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
@ -46,6 +56,22 @@ jobs:
|
|||||||
HostName github.com
|
HostName github.com
|
||||||
IdentityFile ~/.ssh/id_rsa
|
IdentityFile ~/.ssh/id_rsa
|
||||||
EOT
|
EOT
|
||||||
|
|
||||||
|
- name: Get yarn cache directory path
|
||||||
|
id: yarn-cache-dir-path
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
- uses: actions/cache@v2
|
||||||
|
id: yarn-cache
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
|
- name: Install modules
|
||||||
|
run: yarn install --frozen-lockfile
|
||||||
|
- name: Install modules (example/)
|
||||||
|
run: yarn example --frozen-lockfile
|
||||||
|
|
||||||
- name: Release to GitHub Pages
|
- name: Release to GitHub Pages
|
||||||
env:
|
env:
|
||||||
USE_SSH: true
|
USE_SSH: true
|
||||||
|
Loading…
Reference in New Issue
Block a user