-
-
Notifications
You must be signed in to change notification settings - Fork 77
38 lines (37 loc) · 1.15 KB
/
build-resources.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
# This is a basic workflow to help you get started with Actions
name: CI
on:
push:
branches: [master]
release:
types: [published]
branches: [master]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
persist-credentials: false # otherwise, the token used is the GITHUB_TOKEN, instead of your personal token
fetch-depth: 0 # otherwise, you will failed to push refs to dest repo
- uses: actions/setup-node@v1
with:
node-version: 13
- name: Pull Origin
run: git pull origin master
- name: Install Dependencies
run: npm install
- name: Clear Previous File
run: rm -rf ./dist/resources.json
- name: Build Files
run: npm run build
- name: Add Dist File and Update
run: |
git config --local user.email "[email protected]"
git config --local user.name "GitHub Action"
git add ./dist
git commit -m "Updated Resource List" -a
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.GITHUB_TOKEN }}