refactor: rename Tencent CI workflow to Deploy to Tencent COS and upd… #17
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 to Tencent COS | |
| on: | |
| push: | |
| branches: | |
| - master | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 9 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: "22" | |
| cache: "pnpm" | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build | |
| run: pnpm build | |
| - name: Setup Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.11" | |
| - name: Install coscmd | |
| run: pip install coscmd | |
| - name: Configure coscmd | |
| run: | | |
| coscmd config \ | |
| -a ${{ secrets.SECRET_ID }} \ | |
| -s ${{ secrets.SECRET_KEY }} \ | |
| -b ${{ secrets.BUCKET }} \ | |
| -r ap-shanghai | |
| - name: Upload to COS | |
| run: coscmd upload -rfs --delete dist/ / |