Skip to content

Mobile fixes

Mobile fixes #32

Workflow file for this run

name: Deploy to EC2
on:
pull_request:
types: [closed]
workflow_dispatch:
inputs:
deployment_type:
description: 'Deploy to EC2'
required: true
type: choice
options:
- 'full-rebuild'
- 'app-only'
- 'none'
default: 'none'
jobs:
deploy:
runs-on: ubuntu-latest
if: |
(github.event_name == 'workflow_dispatch' && github.event.inputs.deployment_type != 'none') ||
(github.event_name == 'pull_request' && github.event.pull_request.merged == true && contains(github.event.pull_request.labels.*.name, 'deploy'))
steps:
- name: Deploy to EC2
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.EC2_HOST }}
username: ${{ secrets.EC2_USER }}
key: ${{ secrets.EC2_SSH_KEY }}
script: |
cd ~/geoChat/
if [[ "${{ github.event.inputs.deployment_type }}" == "full-rebuild" ]]; then
docker compose down
git pull origin main
docker compose up -d --build
docker system prune -a -f --volumes=false --filter "until=24h"
else
git pull origin main
docker compose up -d --build app
docker image prune -f
fi