Merge pull request #3 from malenelu/main #24
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: Deploy to TDT4242 server development | |
| on: | |
| push: | |
| branches: ["development"] | |
| jobs: | |
| deploy: | |
| runs-on: self-hosted | |
| env: | |
| REPO_NAME: ${{ github.event.repository.name }} | |
| COMPOSE_FILE: ${{ github.event.inputs.config }} | |
| 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 docker-compose.dev.yml --verbose config && printf "OK\n" || exit 1 | |
| - name: Build and run docker image | |
| run: docker compose -f docker-compose.dev.yml up --force-recreate --build -d | |
| - name: Verify that gateway is available | |
| run: docker ps |