edit
This commit is contained in:
15
.github/workflows/deploy.yml
vendored
15
.github/workflows/deploy.yml
vendored
@@ -1,19 +1,28 @@
|
|||||||
name: Deploy App
|
name: Deploy App
|
||||||
|
|
||||||
on: [push]
|
on: [push]
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
|
test:
|
||||||
|
runs-on: ubuntu-22.04
|
||||||
|
steps:
|
||||||
|
- name: Dummy test
|
||||||
|
run: echo "Tests OK"
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
runs-on: ubuntu-22.04
|
runs-on: ubuntu-22.04
|
||||||
needs: test
|
needs: test
|
||||||
container:
|
container:
|
||||||
|
image: alpine:3.20 # choisis une image si tu veux un container isolé
|
||||||
volumes:
|
volumes:
|
||||||
- /var/docker-web:/var/docker-web
|
- /var/docker-web:/var/docker-web
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v4
|
- uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: Deploy with docker-web
|
- name: Deploy with docker-web
|
||||||
run: |
|
run: |
|
||||||
APP_DIR=/var/docker-web/apps/${GITHUB_REPOSITORY##*/}
|
APP_DIR="/var/docker-web/apps/${GITHUB_REPOSITORY##*/}"
|
||||||
mkdir -p $APP_DIR
|
mkdir -p "$APP_DIR"
|
||||||
cp -a $(find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name 'node_modules') "$APP_DIR/"
|
cp -a $(find . -mindepth 1 -maxdepth 1 ! -name '.git' ! -name 'node_modules') "$APP_DIR/"
|
||||||
export COMPOSE_BAKE=false
|
export COMPOSE_BAKE=false
|
||||||
bash /var/docker-web/src/cli.sh up ${GITHUB_REPOSITORY##*/}
|
bash /var/docker-web/src/cli.sh up "${GITHUB_REPOSITORY##*/}"
|
||||||
|
|||||||
Reference in New Issue
Block a user