-
Notifications
You must be signed in to change notification settings - Fork 2
40 lines (35 loc) · 1.07 KB
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
name: CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Install npm packages (with caching)
uses: bahmutov/npm-install@v1.7.1
- name: Run tests
run: npm test
- name: Generate and publish coveralls coverage reports
run: npm run coveralls
env:
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
- name: Create deployment folder
run: mkdir ./deploy && touch ./.nojekyll
- name: Generate HTML coverage reports
run: npm run coverage
- name: debug
run: cp -a ./coverage ./deploy
- name: Build documentation
run: npm run docs
- name: Copy documentation contents (not folder itself!) to deployment folder
run: cp -a ./docs/. ./deploy
- name: Deploy to GitHub pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./deploy