Skip to content

Commit

Permalink
Bundle kamal and upgrade checkout action.
Browse files Browse the repository at this point in the history
  • Loading branch information
gregschmit committed Mar 22, 2024
1 parent 0eda58d commit aa2ddd5
Show file tree
Hide file tree
Showing 9 changed files with 41 additions and 246 deletions.
34 changes: 15 additions & 19 deletions .github/workflows/pipeline.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install Ruby/Gems
uses: ruby/setup-ruby@v1
with:
Expand All @@ -30,7 +30,7 @@ jobs:
CUSTOM_RUBY_VERSION: ${{ matrix.ruby }}
steps:
- name: Checkout code
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Remove `Gemfile.lock` because this is a matrix job
run: rm Gemfile.lock
- name: Install Ruby/Gems
Expand All @@ -52,22 +52,15 @@ jobs:
if: steps.lcov_exists.outputs.files_exists == 'true'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy_render:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master' || startsWith(github.ref, 'refs/tags/')
steps:
- name: Trigger render.com deploy hook
run: curl -X POST '${{ secrets.RENDER_COM_DEPLOY_HOOK }}'
deploy:
needs: test
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/gns/kamal'
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Ensure latest tag is fetched
run: git fetch --unshallow --prune --tags --force
uses: actions/checkout@v4
with:
fetch-tags: true
- uses: webfactory/ssh-agent@v0.9.0
with:
ssh-private-key: ${{ secrets.APPSERVER_DEPLOY_SSH_KEY }}
Expand All @@ -87,16 +80,19 @@ jobs:
if: startsWith(github.ref, 'refs/tags/')
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Ensure latest tag is fetched
run: git fetch --unshallow --prune --tags --force
uses: actions/checkout@v4
with:
fetch-tags: true
- name: Install Ruby/Gems
uses: ruby/setup-ruby@v1
with:
bundler-cache: true
- name: Build the gem
run: gem build rest_framework.gemspec -o rest_framework.gem
- name: Push to RubyGems
env:
GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
run: gem push rest_framework.gem
- name: Display VERSION
run: cat VERSION
# Ensure tag is proper before re-enabling this step.
# - name: Push to RubyGems
# env:
# GEM_HOST_API_KEY: ${{ secrets.RUBYGEMS_API_KEY }}
# run: gem push rest_framework.gem
14 changes: 0 additions & 14 deletions .kamal/hooks/post-deploy.sample

This file was deleted.

3 changes: 0 additions & 3 deletions .kamal/hooks/post-traefik-reboot.sample

This file was deleted.

51 changes: 0 additions & 51 deletions .kamal/hooks/pre-build.sample

This file was deleted.

47 changes: 0 additions & 47 deletions .kamal/hooks/pre-connect.sample

This file was deleted.

109 changes: 0 additions & 109 deletions .kamal/hooks/pre-deploy.sample

This file was deleted.

3 changes: 0 additions & 3 deletions .kamal/hooks/pre-traefik-reboot.sample

This file was deleted.

1 change: 1 addition & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ gem "puma"

# Only Rails >=7.1 gems.
if RAILS_VERSION >= Gem::Version.new("7")
gem "kamal"
gem "ransack", ">= 4.0"
gem "solid_queue"
end
Expand Down
25 changes: 25 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -91,6 +91,7 @@ GEM
rake (>= 10.4, < 14.0)
ast (2.4.2)
base64 (0.2.0)
bcrypt_pbkdf (1.1.0)
better_errors (2.9.1)
coderay (>= 1.0.0)
erubi (>= 1.0.0)
Expand All @@ -113,7 +114,9 @@ GEM
date (3.3.4)
debug_inspector (1.2.0)
docile (1.4.0)
dotenv (2.8.1)
drb (2.2.1)
ed25519 (1.3.0)
erubi (1.12.0)
et-orbi (1.2.9)
tzinfo
Expand All @@ -134,6 +137,17 @@ GEM
reline (>= 0.4.2)
json (2.7.1)
jsonapi-renderer (0.2.2)
kamal (1.3.1)
activesupport (>= 7.0)
base64 (~> 0.2)
bcrypt_pbkdf (~> 1.0)
concurrent-ruby (~> 1.2)
dotenv (~> 2.8)
ed25519 (~> 1.2)
net-ssh (~> 7.0)
sshkit (~> 1.21)
thor (~> 1.2)
zeitwerk (~> 2.5)
kramdown (2.4.0)
rexml
kramdown-parser-gfm (1.1.0)
Expand All @@ -160,8 +174,13 @@ GEM
net-protocol
net-protocol (0.2.2)
timeout
net-scp (4.0.0)
net-ssh (>= 2.6.5, < 8.0.0)
net-sftp (4.0.0)
net-ssh (>= 5.0.0, < 8.0.0)
net-smtp (0.4.0.1)
net-protocol
net-ssh (7.2.1)
nio4r (2.7.1)
nokogiri (1.16.3-x86_64-darwin)
racc (~> 1.4)
Expand Down Expand Up @@ -264,6 +283,11 @@ GEM
railties (>= 7.1)
sqlite3 (1.7.3-x86_64-darwin)
sqlite3 (1.7.3-x86_64-linux)
sshkit (1.22.0)
mutex_m
net-scp (>= 1.1.2)
net-sftp (>= 2.1.2)
net-ssh (>= 2.8.0)
stackprof (0.2.26)
stringio (3.1.0)
thor (1.3.1)
Expand Down Expand Up @@ -299,6 +323,7 @@ DEPENDENCIES
byebug
foreman
httparty
kamal
kramdown
kramdown-parser-gfm
minitest
Expand Down

0 comments on commit aa2ddd5

Please sign in to comment.