Add backend deploy script

This commit is contained in:
Matt Isenhower 2024-11-12 20:18:17 -08:00
parent 32c547cb8d
commit 091b9f45f7

View File

@ -1,4 +1,4 @@
name: Deploy Frontend
name: Deploy
on:
push:
@ -7,7 +7,7 @@ on:
- develop
jobs:
build-and-deploy:
deploy-frontend:
runs-on: ubuntu-latest
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}
@ -38,3 +38,31 @@ jobs:
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: ${{ secrets.AWS_REGION }}
SOURCE_DIR: 'dist'
deploy-backend:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Login to GitHub Container Registry
uses: docker/login-action@v3
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata
id: meta
uses: docker/metadata-action@v5
with:
images: splatoon2ink/app
- name: Build and push Docker image
uses: docker/build-push-action@v6
with:
context: .
file: ./docker/app/Dockerfile
push: true
tags: splatoon2ink/app:latest