mirror of
https://github.com/chartjs/Chart.js.git
synced 2026-03-15 04:36:51 +01:00
ci(workflow): add cache to workflows using actions/setup-node (#9757)
* ci(workflow): add 'npm' cache for actions/setup-node in .github/workflows * style(workflows): restore single quotes and remove unnecessary 'null'
This commit is contained in:
39
.github/workflows/deploy-docs.yml
vendored
39
.github/workflows/deploy-docs.yml
vendored
@@ -10,27 +10,28 @@ jobs:
|
||||
correct_repository:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: fail on fork
|
||||
if: github.repository_owner != 'chartjs'
|
||||
run: exit 1
|
||||
- name: fail on fork
|
||||
if: github.repository_owner != 'chartjs'
|
||||
run: exit 1
|
||||
|
||||
build:
|
||||
needs: correct_repository
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v1
|
||||
with:
|
||||
node-version: '14.x'
|
||||
- name: Package & Deploy Docs
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
./scripts/docs-config.sh "master"
|
||||
npm run docs
|
||||
npm pack
|
||||
./scripts/deploy-docs.sh "master"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_AUTH_TOKEN }}
|
||||
GH_AUTH_EMAIL: ${{ secrets.GH_AUTH_EMAIL }}
|
||||
- uses: actions/checkout@v2
|
||||
- name: Use Node.js
|
||||
uses: actions/setup-node@v2
|
||||
with:
|
||||
node-version: '14.x'
|
||||
cache: npm
|
||||
- name: Package & Deploy Docs
|
||||
run: |
|
||||
npm ci
|
||||
npm run build
|
||||
./scripts/docs-config.sh "master"
|
||||
npm run docs
|
||||
npm pack
|
||||
./scripts/deploy-docs.sh "master"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GH_AUTH_TOKEN }}
|
||||
GH_AUTH_EMAIL: ${{ secrets.GH_AUTH_EMAIL }}
|
||||
|
||||
Reference in New Issue
Block a user