-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (46 loc) · 1.35 KB
/
deploy.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
name: Build and deploy
concurrency:
group: production
cancel-in-progress: true
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened, closed]
branches:
- main
jobs:
build_and_deploy_job:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
env:
DOCKER_BUILDKIT: 1
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
KAMAL_REGISTRY_USERNAME: megasanjay
name: Build and Deploy Job
steps:
# - name: checkout
# uses: actions/checkout@v
# with:
# submodules: true
# lfs: false
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
with:
ruby-version: 3.3.0
bundler-cache: true
- run: gem install kamal
- name: Setup kamal secrets file
run: |
mkdir -p .kamal
touch .kamal/secrets
echo "${{ secrets.KAMAL_REGISTRY_PASSWORD }}" > .kamal/secrets
echo "${{ secrets.SV }}" > .kamal/secrets
chmod 600 .kamal/secrets
- uses: webfactory/[email protected]
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}
- uses: docker/setup-buildx-action@v3
- run: kamal lock release
- run: kamal deploy