46 lines
1.0 KiB
YAML
46 lines
1.0 KiB
YAML
name: Node CI
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
build:
|
|
env:
|
|
CI: true
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@master
|
|
|
|
- name: Use Node.js 12.x
|
|
uses: actions/setup-node@v1
|
|
with:
|
|
node-version: 12.x
|
|
|
|
- name: Get yarn cache
|
|
id: yarn-cache
|
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
|
|
|
- uses: actions/cache@v1
|
|
with:
|
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-yarn-
|
|
- name: install dependencies
|
|
run: yarn install --skip-integrity-check --non-interactive --no-progress
|
|
|
|
- name: lint
|
|
run: yarn tsc && yarn lint
|
|
|
|
- name: build
|
|
run: yarn build --base=/vue3-realworld-example-app/
|
|
|
|
- name: deploy
|
|
uses: s0/git-publish-subdir-action@master
|
|
env:
|
|
REPO: self
|
|
BRANCH: gh-pages
|
|
FOLDER: dist
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|