Deploy Serverless App #9
Workflow file for this run
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 Serverless App | |
| on: | |
| workflow_dispatch: | |
| inputs: | |
| stage: | |
| description: 'Stage to deploy to' | |
| required: false | |
| default: 'prod' | |
| jobs: | |
| deploy: | |
| name: Deploy | |
| runs-on: ubuntu-latest | |
| # Add permissions block for OIDC token | |
| permissions: | |
| id-token: write | |
| contents: read | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v3 | |
| - name: Configure AWS Credentials | |
| uses: aws-actions/configure-aws-credentials@v2 | |
| with: | |
| role-to-assume: arn:aws:iam::942778112339:role/git-deploy | |
| aws-region: eu-central-1 | |
| - name: Install Node.js | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: '18' | |
| - name: Install npm dependencies | |
| run: npm ci | |
| - name: Install Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: '3.12' | |
| - name: Install Poetry | |
| run: | | |
| pip install "poetry==1.8.2" | |
| - name: Serverless Deploy | |
| uses: serverless/github-action@v3.2 | |
| with: | |
| args: deploy --stage ${{ github.event.inputs.stage }} |