Merge pull request #3 from TejasGhatte/main #1
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI/CD Pipeline | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build-and-deploy: | |
runs-on: self-hosted | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: Pull Changes | |
run: git pull origin main | |
working-directory: /home/gravitas/lasertag-gravitas-csi | |
- name: Setup Node.js 20 | |
uses: actions/setup-node@v3 | |
with: | |
node-version: '20' | |
- name: Build and Deploy | |
run: | | |
docker compose -f compose-prod.yaml up --build -d --remove-orphans | |
working-directory: /home/gravitas/lasertag-gravitas-csi | |
- name: Show Docker Compose Logs on Failure | |
if: failure() | |
run: | | |
docker compose -f compose-prod.yaml logs | |
working-directory: /home/gravitas/lasertag-gravitas-csi |