Skip to content

Commit

Permalink
add staging manual deploy step
Browse files Browse the repository at this point in the history
  • Loading branch information
adrienpoly committed Nov 6, 2024
1 parent 40e7f56 commit 3d24269
Show file tree
Hide file tree
Showing 2 changed files with 40 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Deploy to Staging

on:
pull_request: # to remove before merge this is for the workflow to appear in the PR
workflow_dispatch:

jobs:
deploy-staging:
name: Deploy to Staging
runs-on: ubuntu-20.04
timeout-minutes: 20
env:
DOCKER_BUILDKIT: 1
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Set up Docker Buildx
id: buildx
uses: docker/setup-buildx-action@v2
- name: Setup SSH
uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
gemfile: .kamal/deployment.gemfile
- name: Deploy to Staging
env:
VERSION: ${{ github.sha }}
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
KAMAL_RAILS_MASTER_KEY: ${{ secrets.KAMAL_RAILS_MASTER_KEY }}
MEILI_MASTER_KEY: ${{ secrets.MEILI_MASTER_KEY }}
run: bundle exec kamal deploy -d staging
- name: Cleanup on cancellation
if: always() && steps.deploy.conclusion == 'cancelled'
run: bundle exec kamal lock release
2 changes: 2 additions & 0 deletions .kamal/deployment.gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
source 'https://rubygems.org'
gem 'kamal'

0 comments on commit 3d24269

Please sign in to comment.