Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
46 changes: 46 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Vue CI

on:
- push
- pull_request

env:
WARN_ON_PR: "artifact upload is disabled due to the workflow is trigged by pull request."

jobs:
build:
name: Build dist
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Prepare Node.js environment
uses: actions/setup-node@v1

- name: Cache node modules
uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: '${{ runner.os }}-'

- name: Install dependencies
run: 'npm install'

- name: Build dist files
run: |
if ${{ !!github.head_ref }}; then echo "::warning:: $WARN_ON_PR"; fi
npm run build

- name: Upload dist
uses: actions/upload-artifact@v2
with:
name: dist
path: ./dist/*