Skip to content

Merge pull request #870 from johnson-oragui/fix/password-change-and-s… #1

Merge pull request #870 from johnson-oragui/fix/password-change-and-s…

Merge pull request #870 from johnson-oragui/fix/password-change-and-s… #1

Workflow file for this run

name: Dev cd pipeline
on:
push:
branches: [dev]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Build image
run: docker build -t anchor-python-bp-dev:latest -f Dockerfile .
- name: Save image
run: docker save anchor-python-bp-dev:latest | gzip > dev.tar.gz
- name: Copy image to server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
source: "dev.tar.gz"
target: "/home/${{ secrets.USERNAME }}/boilerplate-python/dev_source_code"
- name: Deploy image on server
uses: appleboy/[email protected]
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
password: ${{ secrets.PASSWORD }}
script: |
cd /home/${{ secrets.USERNAME }}/boilerplate-python/dev_source_code
git pull origin dev
docker load --input dev.tar.gz
docker compose -f docker-compose.yml up -d
rm -f dev.tar.gz