2019-10-23 21:44:35 +08:00
|
|
|
name: Node CI
|
|
|
|
|
|
|
|
on: [push]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
|
|
|
|
strategy:
|
|
|
|
matrix:
|
|
|
|
node-version: [12.x]
|
|
|
|
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v1
|
|
|
|
- name: Use Node.js ${{ matrix.node-version }}
|
|
|
|
uses: actions/setup-node@v1
|
|
|
|
with:
|
|
|
|
node-version: ${{ matrix.node-version }}
|
2020-06-12 00:59:40 +08:00
|
|
|
- name: Cache ionic site
|
|
|
|
id: ionic-site
|
|
|
|
uses: actions/cache@v2
|
|
|
|
with:
|
|
|
|
path: ~/ionic-site/
|
|
|
|
key: ionic-site-${{ hashFiles('**/package-lock.json') }}
|
2020-06-12 00:41:20 +08:00
|
|
|
- name: Setup git
|
|
|
|
run: bash ./scripts/git/config.sh
|
2020-06-12 00:47:26 +08:00
|
|
|
- name: Prepare ionic-site repo
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
run: bash ./scripts/docs/prepare.sh
|
2019-10-23 21:44:35 +08:00
|
|
|
- name: Install dependencies
|
|
|
|
run: npm ci
|
|
|
|
- name: Lint
|
|
|
|
run: npm run lint
|
|
|
|
- name: Build
|
|
|
|
run: npm run build
|
|
|
|
- name: Test
|
2019-10-23 21:51:42 +08:00
|
|
|
run: npm run test
|
2019-10-23 21:44:35 +08:00
|
|
|
- name: Readmes
|
|
|
|
run: npm run readmes
|
2020-06-12 00:53:25 +08:00
|
|
|
- name: Deploy doc
|
|
|
|
if: github.ref == 'refs/heads/master'
|
|
|
|
run: bash ./scripts/docs/update_docs.sh
|
2019-10-23 21:44:35 +08:00
|
|
|
env:
|
2020-06-12 01:30:09 +08:00
|
|
|
GITHUB_PROJECT_REPONAME: ${{ github.repository }}
|
|
|
|
GITHUB_SHA1: ${{ github.sha }}
|