generated from szymi/cicd-template
Initial commit
This commit is contained in:
commit
174a1c7159
2 changed files with 20 additions and 0 deletions
19
.forgejo/workflows/deploy.yaml
Normal file
19
.forgejo/workflows/deploy.yaml
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
name: Deploy with Docker Compose
|
||||
|
||||
on: [push]
|
||||
|
||||
jobs:
|
||||
deploy:
|
||||
runs-on: docker
|
||||
container:
|
||||
image: forgejo-actions-base:latest
|
||||
steps:
|
||||
- name: Checkout
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- name: Deploy using Docker Compose (Down and Up)
|
||||
run: |
|
||||
project_name=$(basename "$PWD")
|
||||
echo "Deploying project: $project_name"
|
||||
docker compose -p "$project_name" down
|
||||
docker compose -p "$project_name" up -d --remove-orphans
|
||||
Loading…
Add table
Add a link
Reference in a new issue