This repository has been archived by the owner on Jul 25, 2024. It is now read-only.
Pull preview #21
This file contains 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: PullPreview | |
on: | |
pull_request: | |
types: [labeled, unlabeled, synchronize, closed, reopened] | |
jobs: | |
deploy: | |
permissions: | |
contents: read # to fetch code (actions/checkout) | |
deployments: write # to delete deployments | |
pull-requests: write # to remove labels | |
statuses: write # to create commit status | |
id-token: write # This is required for AWS credentials | |
name: deploy | |
runs-on: ubuntu-latest | |
timeout-minutes: 30 | |
environment: ${{ inputs.environment || 'dev' }} | |
steps: | |
- name: Git clone the repository | |
uses: actions/checkout@v3 | |
- name: install dependencies | |
run: python -m pip install --upgrade pip && pip install -r requirements.txt | |
- name: build static assets (if frontend) | |
run: python build.py | |
- name: configure aws credentials | |
uses: aws-actions/configure-aws-credentials@v2 | |
with: | |
role-to-assume: arn:aws:iam::${{ secrets.AWS_ACCOUNT_NUMBER }}:role/GithubCopilotDeploy | |
role-session-name: POST_AWARD_DATA_STORE_PULLPREVIEW | |
aws-region: eu-west-2 | |
- uses: pullpreview/[email protected] |