From 2cddda371c84954c2d593715ebec6dd8984d8eb5 Mon Sep 17 00:00:00 2001 From: Miraak Date: Wed, 9 Oct 2024 12:27:06 +0200 Subject: [PATCH] Test --- .github/workflows/test.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..3ce55f3 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,36 @@ +name: Deploy Test Build + +on: + # Allows you to run this workflow manually from the Actions tab + workflow_dispatch: + +jobs: + deploy: + name: 🎉 Deploy devlopment build to dev.playdeathgarden.live + runs-on: self-hosted + environment: Dev + defaults: + run: + working-directory: ./dist + + steps: + - name: 🚚 Get latest code + uses: actions/checkout@v4 + with: + fetch-depth: 0 + + - name: Shutdown the application + run: cd /home/gh-action/live/ && docker compose down + + - name: Synchronize to app directory + run: | + rsync -av --delete \ + --exclude ".env" \ + --exclude "storage/" \ + --exclude "node_modules/" \ + --exclude "vendor/" \ + ./ /home/gh-action/live/app/ + + - name: Build and run docker container + run: cd /home/gh-action/live/ && docker compose up --build -d +