update Actions workflow to use ubuntu-latest for builds and add live deployment steps
Some checks failed
Master Build / Update running container (push) Has been cancelled
Master Build / Build and Push Docker Image (amd64) (push) Has been cancelled

This commit is contained in:
José Henrique 2025-01-24 22:21:56 -03:00
parent 37ac35e3f4
commit ccdf9dddc3

View File

@ -7,7 +7,7 @@ on:
jobs:
build_amd64:
name: Build and Push Docker Image (amd64)
runs-on: self-hosted-ubuntu-latest
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
@ -44,7 +44,7 @@ jobs:
- name: Image digest
run: echo ${{ steps.docker_build.outputs.digest }}
deploy:
deploy local (demo):
name: Update running container
runs-on: self-hosted-ubuntu-latest
needs: build_amd64
@ -63,3 +63,23 @@ jobs:
docker compose rm
docker compose pull
docker compose up -d
deploy live:
name: Update running container
runs-on: self-hosted-ubuntu-latest
needs: build_amd64
steps:
- name: Recreate container
uses: https://github.com/appleboy/ssh-action@v1.2.0
with:
host: ${{ secrets.LIVE_HOST }}
username: ${{ secrets.LIVE_USERNAME }}
key: ${{ secrets.LIVE_KEY }}
port: ${{ secrets.LIVE_PORT }}
script: |
cd ${{ secrets.LIVE_PROJECT_DIR }}
docker compose down
docker compose rm
docker compose pull
docker compose up -d