Skip to content

Commit 8cdee8f

Browse files
authored
feat: add oss-deploy action
1 parent e39fad6 commit 8cdee8f

File tree

1 file changed

+21
-0
lines changed

1 file changed

+21
-0
lines changed

.github/workflows/oss-deploy.yml

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
name: Deploy Docs to OSS
2+
on:
3+
push:
4+
branches: [ "deploy" ]
5+
workflow_dispatch:
6+
jobs:
7+
ssh-deploy:
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v3
11+
- name: Install ossutil
12+
run: |
13+
sudo -v ; curl https://gosspublic.alicdn.com/ossutil/install.sh | sudo bash
14+
15+
- name: Deploy OSS
16+
env:
17+
ACCESS_KEY_ID: ${{ secrets.DATAEASE_OSS_AK }}
18+
ACCESS_KEY_SECRET: ${{ secrets.DATAEASE_OSS_SK }}
19+
ACCESS_KEY_BUCKET: ${{ secrets.DATAEASE_OSS_BUCKET }}
20+
run: |
21+
ossutil cp -r -f ./ oss://$ACCESS_KEY_BUCKET/docs --access-key-id=$ACCESS_KEY_ID --access-key-secret=$ACCESS_KEY_SECRET --endpoint=oss-cn-zhangjiakou.aliyuncs.com --exclude '.git*'

0 commit comments

Comments
 (0)