-
Notifications
You must be signed in to change notification settings - Fork 26
43 lines (41 loc) · 1.2 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
41
42
43
name: Build and deploy on GitHub Pages
on:
push:
branches:
- source
pull_request:
branches:
- source
schedule:
- cron: '0 3 1 * *' # monthly
jobs:
build:
name: Build and deploy on GitHub Pages
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Reconfigure git to use HTTP authentication
# see https://github.com/actions/setup-node/issues/214#issuecomment-810829250 for why this is needed
run: >
git config --global url."https://github.com/".insteadOf
ssh://[email protected]/
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: 12.x
- name: Install NPM dependencies
run: npm ci
- name: Check formatting using Prettier
run: npm run prettier-check
- name: Check Dependency Cruiser rules
run: npm run depcruise-check
- name: Build
run: npm run build
- name: Deploy
uses: JamesIves/github-pages-deploy-action@releases/v3
if: ${{ github.event_name == 'push' }}
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: build