-
Notifications
You must be signed in to change notification settings - Fork 0
41 lines (39 loc) · 1.03 KB
/
CI.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
name: CI
on:
push:
branches:
- template
schedule:
- cron: "0 0 * * *"
jobs:
render:
runs-on: ubuntu-latest
name: Render template
steps:
- name: 'Checkout the source code from GitHub'
uses: actions/checkout@v2
with:
ref: template
- name: Install dependencies
run: npm ci
- name: Build
run: npm run build
- name: Lint
run: npm run lint
- name: Render README.md
run: npm start
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Copy CONTRIBUTING.md
run: cp ./CONTRIBUTING.md ./dist/
- name: Copy GitHub Actions # Scheduled workflows only run on master branch :(
run: cp -r ./.github ./dist/
- name: Deploy
if: ${{ github.ref == 'refs/heads/master' || github.ref == 'refs/heads/template' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: master
publish_dir: ./dist
enable_jekyll: true
exclude_assets: ''