update package version #56
This file contains hidden or 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 blog 🚀 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| jobs: | |
| Deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 'lts/jod' | |
| - name: Install COSCLI | |
| run: | | |
| wget https://cosbrowser.cloud.tencent.com/software/coscli/coscli-linux-amd64 | |
| mv coscli-linux-amd64 coscli | |
| chmod 755 coscli | |
| - name: Configure COSCLI | |
| env: | |
| SECRET_ID: ${{ secrets.SECRETID }} | |
| SECRET_KEY: ${{ secrets.SECRETKEY }} | |
| BUCKET: ${{ secrets.BUCKET }} | |
| REGION: ${{ secrets.REGION }} | |
| run: | | |
| ./coscli config add -b $BUCKET -r $REGION -a bucket1 | |
| ./coscli config set --secret_id $SECRET_ID --secret_key $SECRET_KEY | |
| - name: Build | |
| run: | | |
| npm install -g pnpm | |
| pnpm install | |
| pnpm run docs:build | |
| - name: Upload | |
| run: ./coscli sync -r --delete --force ./src/.vuepress/dist/ cos://bucket1/ |