fix(web): lazy initData, OrderDetail error+optimistic-revert, any-ima… #34
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 | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: deploy-${{ github.ref }} | |
| cancel-in-progress: false | |
| permissions: | |
| contents: read | |
| pull-requests: read | |
| jobs: | |
| changes: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| backend: ${{ steps.filter.outputs.backend }} | |
| frontend: ${{ steps.filter.outputs.frontend }} | |
| infra: ${{ steps.filter.outputs.infra }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: dorny/paths-filter@v3 | |
| id: filter | |
| with: | |
| filters: | | |
| backend: | |
| - 'packages/functions/**' | |
| - 'packages/core/**' | |
| frontend: | |
| - 'packages/web/**' | |
| infra: | |
| - 'sst.config.ts' | |
| - 'infra/**' | |
| - '.github/workflows/**' | |
| test: | |
| needs: changes | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: { node-version-file: '.nvmrc', cache: 'npm' } | |
| - run: npm ci | |
| - name: Backend tests | |
| if: needs.changes.outputs.backend == 'true' | |
| run: npm run test --workspace packages/functions | |
| - name: Frontend build check | |
| if: needs.changes.outputs.frontend == 'true' | |
| run: npm run build --workspace packages/web | |
| - name: Change summary | |
| run: | | |
| echo "### Change classification" >> $GITHUB_STEP_SUMMARY | |
| echo "- backend: ${{ needs.changes.outputs.backend }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- frontend: ${{ needs.changes.outputs.frontend }}" >> $GITHUB_STEP_SUMMARY | |
| echo "- infra: ${{ needs.changes.outputs.infra }}" >> $GITHUB_STEP_SUMMARY | |
| deploy: | |
| needs: [changes, test] | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| runs-on: ubuntu-latest | |
| environment: production | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-node@v4 | |
| with: { node-version-file: '.nvmrc', cache: 'npm' } | |
| - run: npm ci | |
| - uses: aws-actions/configure-aws-credentials@v4 | |
| with: | |
| role-to-assume: ${{ vars.AWS_DEPLOY_ROLE_ARN }} | |
| aws-region: ${{ vars.AWS_REGION }} | |
| - name: Deploy | |
| run: npx sst deploy --stage production |