NUXT: add build stage

This commit is contained in:
valere
2025-10-05 09:48:40 +02:00
parent 749f9cef55
commit 04ebe02a05
3 changed files with 15 additions and 8 deletions

View File

@@ -2,14 +2,14 @@ name: Deploy App
on: [push]
jobs:
deploy:
build:
runs-on: ubuntu-22.04
container:
volumes:
- /var/docker-web:/var/docker-web
steps:
- uses: actions/checkout@v4
- name: Deploy with docker-web
- name: Prepare and build app
run: |
REPO_NAME="${GITHUB_REPOSITORY##*/}"
APP_DIR="/var/docker-web/apps/${REPO_NAME}"
@@ -19,4 +19,17 @@ jobs:
cp -a $(find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name 'node_modules') "$APP_DIR/"
export COMPOSE_BAKE=false
docker rmi "local/${REPO_NAME}" 2>/dev/null || true
bash /var/docker-web/src/cli.sh build "${REPO_NAME}"
deploy:
runs-on: ubuntu-22.04
needs: build
container:
volumes:
- /var/docker-web:/var/docker-web
steps:
- uses: actions/checkout@v4
- name: Deploy with docker-web
run: |
REPO_NAME="${GITHUB_REPOSITORY##*/}"
bash /var/docker-web/src/cli.sh up "${REPO_NAME}"

View File

@@ -1,4 +0,0 @@
export REPO_NAME="app-name"
export DOMAIN="app-name.$MAIN_DOMAIN"
export PORT="7903"
export PORT_EXPOSED="3000"

View File

@@ -9,8 +9,6 @@ services:
working_dir: /app
ports:
- "${PORT}:${PORT_EXPOSED}"
volumes:
- "${MEDIA_DIR}:/mnt/media"
environment:
VIRTUAL_HOST: "${DOMAIN}"
LETSENCRYPT_HOST: "${DOMAIN}"