Skip to content

Continuous Deployment #1

Continuous Deployment

Continuous Deployment #1

Workflow file for this run

name: Continuous Deployment
on:
workflow_dispatch:
jobs:
build-and-push:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v1
- name: Set up QEMU
uses: docker/setup-qemu-action@v2
- name: Login to DockerHub
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Build and push backend Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./backend/Dockerfile
platforms: linux/amd64, linux/arm64/v8
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/ghostserver:latest
- name: Build and push frontend Docker image
uses: docker/build-push-action@v4
with:
context: .
file: ./frontend/Dockerfile
platforms: linux/amd64,linux/arm64/v8
build-args: |
VITE_BASE_URL=${{ secrets.VITE_BASE_URL }}
VITE_API_URL=${{ secrets.VITE_BASE_URL }}/api/v1
VITE_ASSET_URL=${{ secrets.VITE_BASE_URL }}
push: true
tags: ${{ secrets.DOCKER_USERNAME }}/ghostclient:latest