fix: update ci lock py39 #340
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: update to cos | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
if: github.repository == 'camera-2018/hdu-cs-wiki' | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20.13.1' | |
- name: Setup Python 3.9 | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.9' | |
- name: install doc dependencies | |
run: sudo npm i | |
- name: install coscmd and tccli | |
run: | | |
python3.9 -m pip install coscmd | |
python3.9 -m pip install tccli | |
- name: build | |
run: | | |
npm run docs:build | |
- name: confirgure coscmd and tccli | |
env: | |
SECRET_ID: ${{ secrets.TCLOUD_API_ID }} | |
SECRET_KEY: ${{ secrets.TCLOUD_API_KEY }} | |
BUCKET: hdu-cs-wiki-1307923872 | |
REGION: ap-shanghai | |
run: | | |
coscmd config -a $SECRET_ID -s $SECRET_KEY -b $BUCKET -r $REGION -m 10 -p 5 | |
tccli configure set secretId $SECRET_ID | |
tccli configure set secretKey $SECRET_KEY | |
tccli configure set region $REGION | |
- name: upload and refresh cdn | |
run: | | |
coscmd upload -rfs --delete ./.vitepress/dist/ / | |
tccli cdn PurgePathCache --cli-unfold-argument --Paths https://wiki.xyxsw.site/ --FlushType flush |