with load #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 Django Application | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
deploy: | |
runs-on: ubuntu-latest | |
environment: dev | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Set up Docker Buildx | |
uses: docker/setup-buildx-action@v3 | |
- name: Build | |
uses: docker/build-push-action@v6 | |
with: | |
context: . | |
push: false | |
tags: qmra:local | |
load: true | |
- name: Save | |
run: docker save qmra > img.tar | |
- name: Push | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.DEPLOY_HOST }} | |
username: ${{ secrets.DEPLOY_USER }} | |
key: ${{ secrets.DEPLOY_SERVER_SSH_KEY }} | |
source: "img.tar" | |
target: ${{ secrets.DEPLOY_PATH }} | |
- name: Deploy | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.DEPLOY_HOST }} | |
username: ${{ secrets.DEPLOY_USER }} | |
key: ${{ secrets.DEPLOY_SERVER_SSH_KEY }} | |
script: | | |
cd ${{ secrets.DEPLOY_PATH }} && git pull | |
microk8s ctr image import img.tar && rm img.tar | |
cd infra/helm | |
microk8s helm upgrade qmra ./qmra -n qmra --set app_secret_key.value=${{ secrets.APP_SECRET_KEY }} |