fix: action #4
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: Deploy to OSS | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v2 | |
- name: Set up Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: "18" # 选择你的Node.js版本 | |
- name: Install dependencies | |
run: npm install | |
- name: Build project | |
run: npm run docs:build | |
- name: Deploy to OSS | |
uses: manyuanrong/[email protected] | |
with: | |
endpoint: ${{ secrets.ENDPOINT }} | |
access-key-id: ${{ secrets.ACCESS_KEY_ID }} | |
access-key-secret: ${{ secrets.ACCESS_SECRET }} | |
- name: Deply To OSS | |
run: ossutil cp -rf ./.vitepress/dist oss://${{ secrets.BUCKET }}/ |