Files
nuxtci/.github/workflows/deploy.yml
valere 5f4e526d6d
Some checks failed
Deploy App / test (push) Failing after 37s
Deploy App / deploy (push) Failing after 10s
test
2025-09-20 00:51:22 +02:00

36 lines
982 B
YAML

name: Deploy App
on: [push]
jobs:
test:
runs-on: ubuntu-22.04
container:
image: node:20-alpine
steps:
- uses: actions/checkout@v4
- name: Install dependencies
run: |
npm install -g pnpm
pnpm install --frozen-lockfile
- name: test
run: pnpm test
deploy:
runs-on: ubuntu-22.04
container:
volumes:
- /var/docker-web:/var/docker-web
steps:
- uses: actions/checkout@v4
- name: Deploy with docker-web
run: |
REPO_NAME="${GITHUB_REPOSITORY##*/}"
APP_DIR="/var/docker-web/apps/${REPO_NAME}"
bash /var/docker-web/src/cli.sh down "${REPO_NAME}"
rm -rf "$APP_DIR"
mkdir "$APP_DIR"
cp -a $(find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name 'node_modules') "$APP_DIR/"
export COMPOSE_BAKE=false
docker rmi "local/${REPO_NAME}"
bash /var/docker-web/src/cli.sh up "${REPO_NAME}"