commit edccc9cfbdb42fb8ba735921d00b2dc54780f370 Author: tienngo Date: Fri Feb 6 09:56:02 2026 +0000 Upload files to "/" diff --git a/deploy-template.yml b/deploy-template.yml new file mode 100644 index 0000000..10b9f14 --- /dev/null +++ b/deploy-template.yml @@ -0,0 +1,36 @@ +name: Deploy Template + +on: + workflow_call: + inputs: + runner: + required: true + type: string + image: + required: true + type: string + +jobs: + deploy: + runs-on: ${{ inputs.runner }} + + steps: + - name: Show target server + run: echo "Deploying on ${{ inputs.runner }}" + + # Force compose to use the exact image tag we built/pushed, regardless of + # what the server's compose file has hard-coded. + - name: Compose Up (Linux) + if: runner.os != 'Windows' + env: + DOCKER_IMAGE: ${{ inputs.image }} + run: | + docker compose up -d --pull always --remove-orphans + + - name: Compose Up (Windows) + if: runner.os == 'Windows' + env: + DOCKER_IMAGE: ${{ inputs.image }} + run: | + docker compose up -d --pull always --remove-orphans +