-
Notifications
You must be signed in to change notification settings - Fork 61
36 lines (34 loc) · 1.08 KB
/
deploy-staging.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
name: Deploy to Staging
on: 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: Setup Ruby
uses: ruby/setup-ruby@v1
with:
bundler: default
bundler-cache: true
- 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