-
Notifications
You must be signed in to change notification settings - Fork 1
32 lines (29 loc) · 963 Bytes
/
deploy-oss.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
name: Upload to OSS
on:
# Runs on pushes targeting the default branch
push:
branches: ["develop-astro-ons"]
jobs:
upload-to-oss:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: '3.x'
- uses: actions/setup-node@v2
with:
node-version: 18
registry-url: https://registry.npmjs.org/
- name: Install And Build
run: npm i && npm run build
- name: Install ossutil
run: |
curl -L http://gosspublic.alicdn.com/ossutil/1.7.0/ossutil64 -o /tmp/ossutil64
chmod +x /tmp/ossutil64
/tmp/ossutil64 config -e https://oss-cn-hangzhou.aliyuncs.com -i ${{ secrets.ALIYUN_ACCESS_KEY_ID }} -k ${{ secrets.ALIYUN_ACCESS_KEY_SECRET }} -L CH
- name: Upload to OSS
run: |
/tmp/ossutil64 cp -r -f ./dist/ oss://${{ secrets.OSS_BUCKET }}/