Skip to content

landing v2: full redesign #35

landing v2: full redesign

landing v2: full redesign #35

Workflow file for this run

name: Deploy to VPS
on:
push:
branches: [main]
permissions:
contents: read
packages: write
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
- name: Log in to GHCR
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Build and push image (validation + registry)
run: |
docker build -t ghcr.io/digihold/insight-app:latest ./app
docker push ghcr.io/digihold/insight-app:latest
deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Deploy on Contabo (pull image, no build on VPS)
uses: appleboy/ssh-action@v1.2.5
with:
host: ${{ secrets.VPS_HOST }}
username: ${{ secrets.VPS_USER }}
key: ${{ secrets.VPS_SSH_KEY }}
envs: GHCR_TOKEN,GHCR_USER,MAPBOX_TOKEN
script: |
echo "$GHCR_TOKEN" | docker login ghcr.io -u "$GHCR_USER" --password-stdin
cd /opt/insight
git pull --ff-only
export MAPBOX_TOKEN="$MAPBOX_TOKEN"
docker compose -p insight pull
docker compose -p insight up -d
docker logout ghcr.io
env:
GHCR_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GHCR_USER: ${{ github.actor }}
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}