-
Notifications
You must be signed in to change notification settings - Fork 23
33 lines (32 loc) · 1.21 KB
/
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
33
name: sentinelguard.io deploy
on:
push:
branches:
- master
jobs:
Build-Deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Use Node.js 10.x
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Build
run: |
npm install && npm run build && mkdir deploy-dist && cp -R index.html zh-cn/ en-us/ build/ docs/ blog/ img/ md_json/ site_config/ deploy-dist/
- name: Use Node.js 12.x
uses: actions/setup-node@v2
with:
node-version: 12.x
- run: npm i @serverless-devs/s -g --registry=https://registry.npmmirror.com
- run: s config add --AccountID ${{secrets.ACCOUNT_ID}} --AccessKeyID ${{secrets.ACCESS_KEYID}} --AccessKeySecret ${{secrets.ACCESS_KEYSECRET}} -a sentinel -f
- name: Deploy
run: s deploy --use-local -y
- name: Update Cache-Control
uses: doggycool/ossutil-github-action@master
with:
ossArgs: 'set-meta oss://sentinel-website-cn-hongkong/ Cache-Control:no-cache -rf'
accessKey: ${{ secrets.ACCESS_KEYID }}
accessSecret: ${{ secrets.ACCESS_KEYSECRET }}
endpoint: oss-cn-hongkong.aliyuncs.com