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
56 changes: 56 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy

env:
AWS_REGION: 'us-east-1'

permissions:
id-token: write
contents: read

on:
# workflow_run:
# workflows: [CI]
# types: [completed]
# branches: [main]
workflow_dispatch:
inputs:
environment:
required: true
default: 'production'
type: choice
options:
- production

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This is pretty much redundant and not used, but I have kept it anyway


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

- name: Set up Ruby
uses: actions/setup-ruby@v1

- name: Install Kamal
run: gem install kamal -v '~> 1.9.2'

- name: Install SSH key
uses: shimataro/ssh-key-action@v2.5.1
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I have added these to the github secrets

config: |
Host *
StrictHostKeyChecking no
UserKnownHostsFile=/dev/null

- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v3.0.1
with:
role-to-assume: arn:aws:iam::037129986032:role/github_deploy
role-session-name: GithubDeploy
aws-region: ${{ env.AWS_REGION }}

- id: deploy
working-directory: ./deploy
run: 'kamal deploy'