Skip to content

Commit

Permalink
deploy_staging workflow with correct docker-compose override
Browse files Browse the repository at this point in the history
  • Loading branch information
dddpt committed Nov 7, 2024
1 parent 108d673 commit 92c4e2f
Showing 1 changed file with 9 additions and 9 deletions.
Original file line number Diff line number Diff line change
@@ -1,12 +1,12 @@
name: Deploy on dev.qfield.cloud
name: Deploy on staging.qfield.cloud
on:
push:
branches:
- master

jobs:
deploy:
name: Deploy on dev.qfield.cloud
name: Deploy on staging.qfield.cloud
runs-on: ubuntu-22.04
steps:
- name: Deploy
Expand All @@ -16,23 +16,23 @@ jobs:
REPO_USERNAME: ${{ secrets.REPO_USERNAME }}
REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
host: dev.qfield.cloud
host: staging.qfield.cloud
username: ${{ secrets.DEV_USERNAME }}
password: ${{ secrets.DEV_PASSWORD }}
envs: DEV_PASSWORD,REPO_TOKEN,REPO_USERNAME
script_stop: true
script: |
cd /opt/qfieldcloud
docker compose -f docker-compose.dev.yml stop
docker compose -f docker-compose.staging.yml stop
echo "$DEV_PASSWORD" | sudo -S git pull https://"$REPO_USERNAME":"$REPO_TOKEN"@github.com/opengisch/qfieldcloud
docker compose -f docker-compose.dev.yml up -d --build
docker compose -f docker-compose.dev.yml exec -T web python manage.py collectstatic --no-input --clear
docker compose -f docker-compose.dev.yml exec -T web python manage.py migrate --noinput
docker compose -f docker-compose.staging.yml up -d --build
docker compose -f docker-compose.staging.yml exec -T web python manage.py collectstatic --no-input --clear
docker compose -f docker-compose.staging.yml exec -T web python manage.py migrate --noinput
status:
name: Check dev.qfield.cloud status
name: Check staging.qfield.cloud status
runs-on: ubuntu-22.04
needs: deploy
steps:
- name: Check
run: curl -f https://dev.qfield.cloud/api/v1/status/
run: curl -f https://staging.qfield.cloud/api/v1/status/

0 comments on commit 92c4e2f

Please sign in to comment.