Skip to content

Merge pull request #133 from Arquisoft/Correcciones_Documentacion #40

Merge pull request #133 from Arquisoft/Correcciones_Documentacion

Merge pull request #133 from Arquisoft/Correcciones_Documentacion #40

Workflow file for this run

name: Deploy on release
on:
push:
branches:
- java-deployment
release:
types: [published]
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Log in to GitHub Container Registry
uses: docker/login-action@v1
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Build and push Docker image
uses: docker/build-push-action@v2
with:
context: .
file: ./Dockerfile
push: true
tags: ghcr.io/arquisoft/wiq_es04b:latest
no-cache: true
deploy:
runs-on: ubuntu-latest
needs: build-and-push
steps:
- name: Deploy over SSH
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.DEPLOY_HOST }}
username: ${{ secrets.DEPLOY_USER }}
key: ${{ secrets.DEPLOY_KEY }}
script: |
wget https://raw.githubusercontent.com/${{ github.repository }}/${{ github.ref_name }}/docker-compose.yml -O docker-compose.yml
docker-compose down
docker compose pull
docker-compose up -d