Skip to content

docker updates

docker updates #29

Workflow file for this run

name: Server Build & Push
on:
push:
branches:
- main
jobs:
build_and_push:
runs-on: ubuntu-latest
steps:
- name: Checkout the repo
uses: actions/checkout@v2
- name: Create env file
run: |
touch .env
echo "${{ secrets.SERVER_ENV_PROD }}" > .env
- name: Build image
run: docker compose -f docker-compose.yml build
- name: Deploy Stack
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
path: site
script: |
git clone https://github.com/SamuelSlavka/site.git 2> /dev/null
cd site
git pull
touch .env
echo "${{ secrets.SERVER_ENV_PROD }}" > .env
docker-compose pull
docker-compose up -d
docker-compose restart