Checking Is Backend running #25
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: Build and Deploy Learning App | |
on: | |
push: | |
branches: | |
- main # Trigger the workflow when there is a push to the 'main' branch | |
jobs: | |
build: | |
runs-on: self-hosted # Use your self-hosted runner | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 # Check out the repository | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 # Setup Buildx (latest version) | |
- name: Cache Docker layers | |
uses: actions/cache@v4 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx- | |
- name: Build and run Docker Compose | |
run: sudo docker compose up -d # Run Docker Compose in detached mode |