forked from zhongfly/now-subconverter
-
Notifications
You must be signed in to change notification settings - Fork 2
52 lines (43 loc) · 1.06 KB
/
sub-web.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
44
45
46
47
48
49
50
51
52
name: Update sub-web
on:
workflow_dispatch:
push:
paths:
- 'subconverter/**'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [10.x]
steps:
- uses: actions/checkout@v2
- name: Update sub-web
run: |
rm -rf sub-web
git clone https://github.com/zhongfly/sub-web.git
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}
- name: Get dependencies and build
run: |
cd sub-web
yarn install
yarn build
- name: Clean up
run: |
cd $GITHUB_WORKSPACE
mkdir temp
sudo cp -rf sub-web/dist/* temp/
sudo rm -rf sub-web
mv temp sub-web
- name: Add & Commit
uses: EndBug/add-and-commit@v6
with:
author_name: GitHub Action
author_email: [email protected]
message: "Update sub-web from zhongfly/sub-web"
add: "-A"
env:
token: ${{ secrets.GITHUB_TOKEN }}