update Actions workflow to use ubuntu-latest for builds and add live deployment steps
This commit is contained in:
parent
37ac35e3f4
commit
ccdf9dddc3
@ -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
|
||||
|
Loading…
x
Reference in New Issue
Block a user