diff --git a/.gitea/workflows/deploy.yaml b/.gitea/workflows/deploy.yaml new file mode 100644 index 000000000..8c265a67f --- /dev/null +++ b/.gitea/workflows/deploy.yaml @@ -0,0 +1,11 @@ +name: Deploy Tools +on: + push: + branches: + - main +jobs: + deploy: + runs-on: ubuntu + steps: + - name: Run deploy script + run: /home/ubuntu/apps/prd-dap-tools/deploy.sh diff --git a/deploy.sh b/deploy.sh index e5bae69e8..e10ac7361 100644 --- a/deploy.sh +++ b/deploy.sh @@ -4,12 +4,12 @@ APP_DIR="/home/ubuntu/apps/dap-mcp" # 1. Update and Build Gateway (dapms) cd $APP_DIR/dap-was-dapms -git pull +git reset --hard HEAD && git pull docker run --rm -v $(pwd):/app -w /app eclipse-temurin:21-jdk-alpine sh -c "chmod +x gradlew && ./gradlew clean build -x test" # 2. Update and Build Tools (dapmt) cd $APP_DIR/dap-was-dapmt -git pull +git reset --hard HEAD && git pull docker run --rm -v $(pwd):/app -w /app eclipse-temurin:21-jdk-alpine sh -c "chmod +x gradlew && ./gradlew clean build -x test" # 3. Deploy