Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Deploy
name: Deploy API
concurrency:
group: production
cancel-in-progress: true
Expand All @@ -13,7 +13,7 @@ on:
options:
- staging
- prod
run-name: Deploy to ${{ inputs.env }}
run-name: Deploy API to ${{ inputs.env }}

jobs:
deploy:
Expand Down Expand Up @@ -52,7 +52,7 @@ jobs:
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- uses: crazy-max/ghaction-github-runtime@3cb05d89e1f492524af3d41a1c98c83bc3025124 # v3.1.0

- name: Deploy
- name: Deploy API
run: |
echo "------------------------"
echo "Deliver image to env (ignored) ${{ github.event.inputs.env }}"
Expand Down
63 changes: 63 additions & 0 deletions .github/workflows/kamal-deploy-webapp.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy Webapp
concurrency:
group: production
cancel-in-progress: true
on:
workflow_dispatch:
inputs:
env:
description: "Environment to deploy to"
required: true
default: "staging"
type: choice
options:
- staging
- prod
run-name: Deploy Webapp to ${{ inputs.env }}

jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
attestations: write
id-token: write
env:
DOCKER_BUILDKIT: 1
KAMAL_REGISTRY_USERNAME: ${{ secrets.KAMAL_REGISTRY_USERNAME }}
KAMAL_REGISTRY_PASSWORD: ${{ secrets.KAMAL_REGISTRY_PASSWORD }}
HOST_IP: ${{ secrets.HOST_IP }}
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0

- name: Install Kamal
uses: ruby/setup-ruby@8aeb6ff8030dd539317f8e1769a044873b56ea71 # v1.268.0
with:
ruby-version: 3.4.1
bundler-cache: true
- run: gem install kamal

- uses: webfactory/ssh-agent@a6f90b1f127823b31d4d4a8d96047790581349bd # v0.9.1
with:
ssh-private-key: ${{ secrets.SSH_PRIVATE_KEY }}

- name: Log in to the ghcr.io
uses: docker/login-action@5e57cd118135c172c3672efd75eb46360885c0ef # v3.6.0
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- uses: docker/setup-qemu-action@c7c53464625b32c7a7e944ae62b3e17d2b600130 # v3.7.0
- uses: docker/setup-buildx-action@e468171a9de216ec08956ac3ada2f0791b6bd435 # v3.11.1
- uses: crazy-max/ghaction-github-runtime@3cb05d89e1f492524af3d41a1c98c83bc3025124 # v3.1.0

- name: Deploy Webapp
working-directory: ./webapp
run: |
echo "------------------------"
echo "Deliver image to env (ignored) ${{ github.event.inputs.env }}"
echo "------------------------"
kamal deploy
echo "------------------------"
kamal details
12 changes: 0 additions & 12 deletions webapp/config/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,3 @@ env:

ssh:
user: player

accessories:
arcadedb:
image: arcadedata/arcadedb-headless:25.4.1
host: <%= ENV["HOST_IP"] %>
volumes:
- /home/player/linklift/config:/home/arcadedb/config
- /home/player/linklift/databases:/home/arcadedb/databases
- /home/player/linklift/log:/home/arcadedb/log
env:
clear:
JAVA_OPTS: "-Darcadedb.server.plugins=Postgres:com.arcadedb.postgres.PostgresProtocolPlugin"
Loading