Skip to content

Commit 82470f6

Browse files
committed
Add deployment workflow
1 parent 3ee59af commit 82470f6

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

.github/workflows/deploy.yml

+41
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name: Deploy
2+
on:
3+
push:
4+
branches:
5+
- master
6+
7+
jobs:
8+
deploy:
9+
name: Deploy to gh-pages branch
10+
runs-on: ubuntu-latest
11+
steps:
12+
- uses: actions/checkout@v2
13+
- uses: actions/setup-node@v1
14+
with:
15+
node-version: 12
16+
17+
- run: git config user.name "${GITHUB_ACTOR}"
18+
- run: git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
19+
20+
- run: npm run dist
21+
22+
- run: git push origin `git subtree split --prefix dist master`:gh-pages --force
23+
24+
lint:
25+
name: Lint master branch
26+
runs-on: ubuntu-latest
27+
steps:
28+
- uses: actions/checkout@v2
29+
- uses: actions/setup-node@v1
30+
with:
31+
node-version: 12
32+
33+
- run: npm i
34+
- run: npm run lint
35+
36+
- uses: EndBug/add-and-commit@v4
37+
with:
38+
add: src
39+
message: "[auto] Lint source code"
40+
env:
41+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)