Skip to content

Merge pull request #9 from Chefies/feat/old-password-verify #16

Merge pull request #9 from Chefies/feat/old-password-verify

Merge pull request #9 from Chefies/feat/old-password-verify #16

Workflow file for this run

name: Deployment
on:
push:
branches:
- main
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Docker Image
run: |
mkdir ./keys
echo '${{ secrets.CREDENTIALS }}' > ./keys/credentials.json
ls
ls ./keys
docker build -t chefies-backend .
- name: Save Docker Image as TAR File
run: |
docker save -o chefies-backend.tar chefies-backend
- name: Send TAR File to Server
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOYMENT_HOST }}
username: ${{ secrets.DEPLOYMENT_HOST_USERNAME }}
key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
port: 22
source: chefies-backend.tar
target: images/
- name: Run Docker Image
uses: appleboy/[email protected]
with:
host: ${{ secrets.DEPLOYMENT_HOST }}
username: ${{ secrets.DEPLOYMENT_HOST_USERNAME }}
key: ${{ secrets.DEPLOYMENT_HOST_KEY }}
port: 22
script: |
docker container rm -f chefies-backend
docker image rm -f chefies-backend
docker load -i images/chefies-backend.tar
docker run --name chefies-backend -e GOOGLE_APPLICATION_CREDENTIALS="/app/keys/credentials.json" -d --restart always -p 9000:80 chefies-backend