diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml new file mode 100644 index 0000000..4ab440c --- /dev/null +++ b/.github/workflows/main.yml @@ -0,0 +1,26 @@ +name: Build and deploy to an VM + +on: + push: + branches: + - main + workflow_dispatch: + +permissions: + contents: write + +jobs: + build-and-deploy: + runs-on: self-hosted + steps: + - name: Copy Repository + uses: actions/checkout@v4 + + - name: 'Create env file' + run: | + touch .env + echo "NEXT_PUBLIC_API_URL=${{ secrets.NEXT_PUBLIC_API_URL }}" >> .env + cat .env + + - name: Running Docker Compose + run: docker compose up -d --build