Merge pull request #4 from Excali-Studio/exd-115 #8
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: Docker Image and Deployment CI | |
on: | |
workflow_dispatch: | |
inputs: | |
only_env: | |
description: "Only update .env" | |
type: boolean | |
required: false | |
default: false | |
push: | |
branches: | |
- main | |
- develop | |
jobs: | |
build-deploy: | |
runs-on: self-hosted | |
timeout-minutes: 30 | |
environment: | |
name: ${{ github.ref_name }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Copy ENV file | |
run: echo "${{ vars.APP_ENV_FILE }}" > .env | |
- name: Build Docker image | |
if: inputs.only_env == false | |
run: sudo docker build . --tag excali-front-dev:latest -f Dockerfile | |
- name: Run Docker image | |
working-directory: ${{ secrets.DESTINATION_PATH }} | |
run: docker compose up -d |