fix deploy action #5
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 Frontend Support to App Runner | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'apps/frontendsupport/**' | |
| - 'packages/**' | |
| - 'pnpm-lock.yaml' | |
| - '.github/workflows/deploy-frontendsupport.yml' | |
| env: | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_DEFAULT_REGION: "us-east-1" | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.26.2 | |
| - name: Creating .npmrc | |
| run: | | |
| "${GITHUB_WORKSPACE}/scripts/create-npmrc.sh" "${{ secrets.NPM_TOKEN }}" | |
| env: | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| - name: Install dependencies | |
| run: pnpm install --no-frozen-lockfile | |
| - name: Deploy to App Runner | |
| env: | |
| DOCKER_DEFAULT_PLATFORM: linux/amd64 | |
| NPM_TOKEN: ${{ secrets.NPM_TOKEN }} | |
| AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }} | |
| AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }} | |
| AWS_DEFAULT_REGION: us-east-1 | |
| run: | | |
| echo "Deploying to App Runner" | |
| pnpm --filter @cutting/frontend-support deploy:web | |
| SERVICE_ARN=$(aws apprunner list-services --query "ServiceSummaryList[?ServiceName=='frontendsupport'].ServiceArn | [0]" --output text) | |
| aws apprunner start-deployment --service-arn $SERVICE_ARN |