更新依赖 #74
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: Build and Deploy | |
| on: | |
| push: | |
| branches: [ master ] | |
| workflow_dispatch: | |
| jobs: | |
| build: | |
| runs-on: arc-rs-ncuhome | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v6 | |
| with: | |
| package-manager-cache: false | |
| - name: Build dist | |
| run: | | |
| corepack enable | |
| pnpm install | |
| pnpm build | |
| - name: Sync to S3 | |
| env: | |
| AWS_REGION: garage | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_ENDPOINT_URL: https://s3.ncuos.com | |
| AWS_MAX_ATTEMPTS: 10 | |
| BUCKET_NAME: incu-fe | |
| run: | | |
| aws s3 sync dist/ s3://$BUCKET_NAME/ --delete |