let pipeline happen at wherever the actions runner chooses #3
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 for website | |
on: | |
push: | |
branches: [ main ] | |
pull_request: | |
branches: [ main ] | |
jobs: | |
deploy-project: | |
runs-on: home-server | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Check docker compose is present | |
run: | | |
docker compose --version | |
- name: Navigate to the hbd dir and build + bring up the container | |
run: | | |
docker compose -f docker-compose-prod.yml build && | |
docker stop hbd || true && | |
docker rm hbd || true && | |
docker compose -f docker-compose-prod-yml up -d hbd |