shareon/.github/workflows/node.yml

42 lines
941 B
YAML

name: Node.js CI
on:
push:
branches:
- master
- develop
- release/*
pull_request:
branches:
- master
jobs:
build:
name: Node.js CI
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14
- name: Install Yarn
uses: bahmutov/npm-install@v1.1.0
- name: Test
run: yarn test
- name: Copy built files to docs
run: cp ./dist/shareon.min.* ./docs
if: ${{ github.ref == 'refs/heads/master' }}
- name: Deploy to GitHub Pages
uses: crazy-max/ghaction-github-pages@v2.1.2
with:
keep_history: true
build_dir: docs
fqdn: shareon.js.org
jekyll: false
if: ${{ github.ref == 'refs/heads/master' }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}