From 32a0d6b82a5ef5938a055f45be71fc096ed2a27f Mon Sep 17 00:00:00 2001 From: Justin Toniazzo Date: Wed, 8 Jan 2025 17:30:53 -0500 Subject: [PATCH] gha deploy --- .github/workflows/elixir.yml | 30 ++++++++++++++++ .kamal/Gemfile | 3 ++ .kamal/Gemfile.lock | 69 ++++++++++++++++++++++++++++++++++++ 3 files changed, 102 insertions(+) create mode 100644 .kamal/Gemfile create mode 100644 .kamal/Gemfile.lock diff --git a/.github/workflows/elixir.yml b/.github/workflows/elixir.yml index 4042ef040..70480ea2f 100644 --- a/.github/workflows/elixir.yml +++ b/.github/workflows/elixir.yml @@ -366,3 +366,33 @@ jobs: with: name: release path: _build/prod/rel/homepage + + deploy: + # if: github.ref == 'refs/heads/main' + runs-on: ubuntu-latest + env: + KAMAL_REGISTRY_USERNAME: ${{ secrets.KAMAL_REGISTRY_USERNAME }} + KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }} + SECRET_KEY: ${{ secrets.SECRET_KEY }} + concurrency: + group: deploy + steps: + - name: Checkout code + uses: actions/checkout@v4 + - name: Set up Docker Buildx + uses: docker/setup-buildx-action@v3 + - name: SSH Auth + uses: webfactory/ssh-agent@v0.9.0 + with: + ssh-private-key: ${{ secrets.SSH_KEY }} + - run: "ssh-keyscan -H jutonz.com > ~/.ssh/known_hosts" + - name: Install Ruby + uses: ruby/setup-ruby@v1 + env: + BUNDLE_GEMFILE: .kamal/Gemfile + with: + ruby-version: 3.4 + bundler-cache: true + - run: tree vendor + - run: cd vendor/bundle/ruby/3.4.0 + - run: bin/kamal deploy diff --git a/.kamal/Gemfile b/.kamal/Gemfile new file mode 100644 index 000000000..fd866a8e8 --- /dev/null +++ b/.kamal/Gemfile @@ -0,0 +1,3 @@ +source "https://rubygems.org" + +gem "kamal", "~> 2.4" diff --git a/.kamal/Gemfile.lock b/.kamal/Gemfile.lock new file mode 100644 index 000000000..cfc75a5b5 --- /dev/null +++ b/.kamal/Gemfile.lock @@ -0,0 +1,69 @@ +GEM + remote: https://rubygems.org/ + specs: + activesupport (8.0.1) + base64 + benchmark (>= 0.3) + bigdecimal + concurrent-ruby (~> 1.0, >= 1.3.1) + connection_pool (>= 2.2.5) + drb + i18n (>= 1.6, < 2) + logger (>= 1.4.2) + minitest (>= 5.1) + securerandom (>= 0.3) + tzinfo (~> 2.0, >= 2.0.5) + uri (>= 0.13.1) + base64 (0.2.0) + bcrypt_pbkdf (1.1.1) + benchmark (0.4.0) + bigdecimal (3.1.9) + concurrent-ruby (1.3.4) + connection_pool (2.5.0) + dotenv (3.1.7) + drb (2.2.1) + ed25519 (1.3.0) + i18n (1.14.6) + concurrent-ruby (~> 1.0) + kamal (2.4.0) + activesupport (>= 7.0) + base64 (~> 0.2) + bcrypt_pbkdf (~> 1.0) + concurrent-ruby (~> 1.2) + dotenv (~> 3.1) + ed25519 (~> 1.2) + net-ssh (~> 7.3) + sshkit (>= 1.23.0, < 2.0) + thor (~> 1.3) + zeitwerk (>= 2.6.18, < 3.0) + logger (1.6.4) + minitest (5.25.4) + 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-ssh (7.3.0) + ostruct (0.6.1) + securerandom (0.4.1) + sshkit (1.23.2) + base64 + net-scp (>= 1.1.2) + net-sftp (>= 2.1.2) + net-ssh (>= 2.8.0) + ostruct + thor (1.3.2) + tzinfo (2.0.6) + concurrent-ruby (~> 1.0) + uri (1.0.2) + zeitwerk (2.7.1) + +PLATFORMS + arm64-darwin + ruby + x86_64-darwin + +DEPENDENCIES + kamal (~> 2.4) + +BUNDLED WITH + 2.5.18