forked from mathialm/secfit
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: first attempt deploy-dev actions
- Loading branch information
Jolan
committed
Mar 4, 2025
1 parent
de49f3e
commit 825b916
Showing
1 changed file
with
46 additions
and
0 deletions.
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,46 @@ | ||
| name: Deploy to Development | ||
|
|
||
| on: | ||
| push: | ||
| branches: | ||
| - add_deploy_dev | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: self-hosted | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
|
|
||
| - name: Set up environment variables | ||
| uses: falti/dotenv-action@v1.1.4 | ||
| with: | ||
| export-variables: true | ||
| keys-case: bypass | ||
|
|
||
| - name: Check environment variables | ||
| run: env | ||
|
|
||
| - name: Stop and remove existing containers | ||
| run: | | ||
| sudo docker compose -f docker-compose.dev.yml down | ||
| - name: Build Docker images | ||
| run: | | ||
| sudo docker compose -f docker-compose.dev.yml build | ||
| - name: Run Docker containers | ||
| run: | | ||
| sudo docker compose -f docker-compose.dev.yml up -d | ||
| - name: Check Docker containers | ||
| run: | | ||
| sudo docker ps | ||
| - name: Test app deployment | ||
| run: | | ||
| sudo curl -s http://localhost:20514 || echo "Backend not accessible" && exit 1 | ||
| sudo curl -s http://localhost:20515 || echo "Frontend not accessible" && exit 1 | ||
| sudo curl -s http://localhost:20516 || echo "Gateway not accessible" && exit 1 |