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.
- Loading branch information
Emilorv
committed
Mar 30, 2025
1 parent
01608db
commit bcf84ed
Showing
3 changed files
with
50 additions
and
9 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,36 @@ | ||
| name: Deploy to TDT4242 server development | ||
|
|
||
| on: | ||
| push: | ||
| branches: [ "main" ] | ||
| pull_request: | ||
| branches: [ "main" ] | ||
|
|
||
| jobs: | ||
| deploy: | ||
| runs-on: self-hosted | ||
| env: | ||
| REPO_NAME: ${{ github.event.repository.name }} | ||
| COMPOSE_FILE: "docker-compose.yml" | ||
|
|
||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@v3 | ||
| - name: Dotenv Action | ||
| uses: falti/dotenv-action@v1.1.4 | ||
| with: | ||
| export-variables: true | ||
| keys-case: bypass | ||
|
|
||
| - name: Check status of config file | ||
| run: | | ||
| env | ||
| docker compose version | ||
| cd $GITHUB_WORKSPACE | ||
| docker compose -f $COMPOSE_FILE --verbose config && printf "OK\n" || exit 1 | ||
| - name: Build and run docker image | ||
| run: docker compose -f $COMPOSE_FILE up --force-recreate --build -d | ||
|
|
||
| - name: Verify that gateway is available | ||
| run: docker ps |
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
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