Skip to content

Added deployment for webapp. #5

Added deployment for webapp.

Added deployment for webapp. #5

Workflow file for this run

name: deploy webapp
concurrency: deploy
on:
workflow_dispatch:
push:
branches:
- main
- develop
paths:
- frontend/**
- .github/workflows/deploy-webapp.yaml
jobs:
build:
name: Deploy frontend
runs-on: "ubuntu-24.04"
environment: deploy
defaults:
run:
shell: bash -l {0}
steps:
- uses: actions/checkout@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: "Unlock git-crypt secrets"
uses: sliteteam/github-action-git-crypt-unlock@f99c0c6b60bb7ec30dcec033a8f0a3b3d48f21e1
env:
GIT_CRYPT_KEY: ${{ secrets.GIT_CRYPT_KEY }}
- name: Login to Docker
uses: azure/docker-login@v1
with:
login-server: c63eqfuv.c1.gra9.container-registry.ovh.net
username: ${{ secrets.DOCKER_USERNAME }}
password: ${{ secrets.DOCKER_PASSWORD }}
- name: Extract metadata for Docker
id: meta
uses: docker/metadata-action@v5
with:
images: c63eqfuv.c1.gra9.container-registry.ovh.net/webapp
tags: |
type=ref,event=branch
type=sha,format=short
latest
- name: Build and push Docker image
uses: docker/build-push-action@v5
with:
context: ./webapp
file: ./webapp/Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
labels: ${{ steps.meta.outputs.labels }}
cache-from: type=gha
cache-to: type=gha,mode=max