Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
name: Deploy (production)

on:
workflow_dispatch:

jobs:
copilot:
name: AWS Copilot

permissions:
id-token: write
contents: read

environment:
name: production
url: https://${{ steps.host-name.outputs.value }}

concurrency:
group: production
cancel-in-progress: true

runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::820242920762:role/GitHubActionsRole
aws-region: eu-west-2

- name: Install and Verify AWS Copilot
run: |
curl -Lo /tmp/copilot https://github.com/aws/copilot-cli/releases/latest/download/copilot-linux
chmod +x /tmp/copilot
mv /tmp/copilot /usr/local/bin/copilot
copilot --version

- name: Deploy the application using AWS Copilot
run: |
copilot svc deploy --name webapp --env production

- name: Get host name
id: host-name
run: |
echo "value=production" >> $GITHUB_OUTPUT
Loading