Skip to content

Update deploy.yml

Update deploy.yml #2

Workflow file for this run

name: Docker Image CI
on:
push:
branches: [ "master" ]
release:
types: [published]
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- uses: actions/checkout@v3
-
name: Login to GitHub Container Registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
# - name: Install SSH Key
# uses: shimataro/ssh-key-action@v2
# with:
# key: ${{ secrets.PIPELINE_PRIVATE_KEY }}
# known_hosts: unnecessary
- name: Build the Docker image
run: |
docker build . --file Dockerfile --tag ghcr.io/bossboxing/friendblockly:latest
docker push ghcr.io/bossboxing/friendblockly:latest
# - name: Deploy To Server
# uses: appleboy/ssh-action@master
# with:
# host: ${{ secrets.HOST }}
# username: 'root'
# password: ${{ secrets.PASSWORD }}
# # key: ${{ secrets.PIPELINE_PRIVATE_KEY }}
# port: 22
# script: |
# cd /root/workspace/
# docker compose pull markodd-backend
# docker compose up -d markodd-backend
# docker image prune -af