-
-
Notifications
You must be signed in to change notification settings - Fork 199
32 lines (25 loc) · 819 Bytes
/
Copy pathaliyun-cdn-publish.yml
File metadata and controls
32 lines (25 loc) · 819 Bytes
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: Publish to Aliyun
on:
release:
types: [published]
workflow_dispatch:
jobs:
aliyun-cdn-publish:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 18
- name: Setup Aliyun OSS
uses: manyuanrong/setup-ossutil@master
with:
endpoint: ${{ secrets.ALI_ENDPOINT }}
access-key-id: ${{ secrets.ALI_ACCESSKEYID }}
access-key-secret: ${{ secrets.ALI_ACCESSKEYSECRET }}
- name: Upload to Aliyun OSS
run: |
VERSION=$(echo ${{ github.event.release.name }} | sed 's/v//')
ossutil cp -r source/ oss://${{ secrets.ALI_BUCKET }}/projects/hexo-theme-redefine@$VERSION/source/