-
Notifications
You must be signed in to change notification settings - Fork 48
42 lines (36 loc) · 1.01 KB
/
deploy.yml
File metadata and controls
42 lines (36 loc) · 1.01 KB
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
37
38
39
40
41
42
name: Deploy
on:
workflow_run:
workflows: ["CI"]
branches: [main]
types:
- completed
jobs:
deploy:
runs-on: ubuntu-latest
if: false # deploy is disabled by default
# uncomment to enable:
# if: ${{ github.event.workflow_run.conclusion == 'success' }}
timeout-minutes: 20
env:
DOCKER_BUILDKIT: 1
BUNDLE_ONLY: deploy
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Setup SSH
uses: webfactory/ssh-agent@v0.10.0
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Deploy
env:
VERSION: ${{ github.sha }}
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
RAILS_MASTER_KEY: ${{ secrets.RAILS_MASTER_KEY }}
run: bundle exec kamal deploy --version=$VERSION