Skip to content
This repository has been archived by the owner on Oct 15, 2023. It is now read-only.

Update manager.js

Update manager.js #48

Workflow file for this run

name: Build
on:
- push
- pull_request
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v2
- name: Cache node_modules
uses: actions/cache@v1
env:
cache-name: cache-node-modules
with:
path: ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
${{ runner.os }}-build-
${{ runner.os }}-
- uses: actions/setup-node@v1
with:
node-version: 12.14.0
- name: Install dependencies
run: npm ci
- name: Test ESLint
run: npm run test:eslint
- name: Test Stylelint
run: npm run test:stylelint
- name: Test Markdown
run: npm run test:markdown
- name: Test
run: npm run test
- name: Upload coverage artifacts
uses: actions/upload-artifact@v1
if: github.ref == 'refs/heads/master' &&
github.repository == 'yoriiis/step-manager' &&
github.event_name != 'pull_request'
with:
name: coverage
path: coverage
- name: Build
run: |
npm run build
npm run build:example
- name: Create GitHub Pages
run: npm run create:gh-pages
- name: Upload GitHub Pages artifacts
uses: actions/upload-artifact@v1
if: github.ref == 'refs/heads/master' &&
github.repository == 'yoriiis/step-manager' &&
github.event_name != 'pull_request'
with:
name: demo
path: gh-pages
deploy-gh-pages:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: build
if: success() &&
github.ref == 'refs/heads/master' &&
github.repository == 'yoriiis/step-manager' &&
github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- name: Download GitHub Pages artifacts
uses: actions/download-artifact@v1
with:
name: demo
path: gh-pages
- name: Deploy to Github Pages
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: gh-pages
keep_history: true
commit_message: "Deploy to GitHub pages"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
deploy-coverage:
runs-on: ubuntu-latest
timeout-minutes: 10
needs: build
if: success() &&
github.ref == 'refs/heads/master' &&
github.repository == 'yoriiis/step-manager' &&
github.event_name != 'pull_request'
steps:
- uses: actions/checkout@v2
- name: Download coverage artifacts
uses: actions/download-artifact@v1
with:
name: coverage
- uses: actions/setup-node@v1
with:
node-version: 12.14.0
- name: Coveralls
uses: coverallsapp/github-action@master
with:
github-token: ${{ secrets.GITHUB_TOKEN }}