-
Notifications
You must be signed in to change notification settings - Fork 0
50 lines (38 loc) · 1.16 KB
/
upyun.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
name: deploy upyun
on:
push:
branches: [ main ]
schedule:
- cron: "0 0 * * *"
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
ref: main
- name: Use Node.js
uses: actions/setup-node@v2
with:
node-version: '17.x'
cache: 'npm'
- name: Install Depend
run: npm install
- name: Update caniuse-lite Database
run: npm run update
- name: Commit files
run: |
git config --local user.name github-actions
git config --local user.email [email protected]
git commit -am "Auto Update browser latest DB"
- name: Push changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.BOT_TOKEN }}
branch: main
- name: Build
run: npm run build
- name: Prepare the upload environment
run: wget --quiet -O- https://github.com/upyun/upx/releases/download/v0.3.6/upx_0.3.6_linux_x86_64.tar.gz | tar -xz
- name: Deploy Upyun
run: ./upx login ${{ secrets.BUCKET }} ${{ secrets.USERNAME }} ${{ secrets.PASSWORD }} && ./upx sync build/ --delete && ./upx logout