-
Notifications
You must be signed in to change notification settings - Fork 16
43 lines (40 loc) · 1.19 KB
/
update-page.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
name: update-page
on:
push:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: pnpm/action-setup@v2
with:
version: latest
run_install: true
- uses: actions/setup-node@v3
with:
cache: pnpm
- run: pnpm install
- run: pnpm run build
env:
NODE_OPTIONS: --max_old_space_size=4096
- name: publish
env:
OSS_CONFIG: ${{ secrets.OSS_CONFIG }}
OSS_NAME: ${{ secrets.OSS_NAME }}
run: |
wget http://gosspublic.alicdn.com/ossutil/1.7.1/ossutil64
sudo chmod 755 ossutil64
echo -e "${OSS_CONFIG}" > ~/.ossutilconfig
./ossutil64 cp -u -r -j 20 docs/.vuepress/dist/ oss://${OSS_NAME}/
echo "此文档为离线版,请访问arduino.luatos.com获取最新版本,文档更新时间:$(TZ=UTC-8 date +%Y-%m-%d,%H:%m:%S)" > "请先读我.txt"
- name: Upload artifact
uses: actions/upload-artifact@v3
with:
name: build
path: build