mirror of
https://github.com/misenhower/splatoon2.ink.git
synced 2026-04-26 17:38:29 -05:00
Add backend deploy script
This commit is contained in:
parent
32c547cb8d
commit
091b9f45f7
|
|
@ -1,4 +1,4 @@
|
||||||
name: Deploy Frontend
|
name: Deploy
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
|
|
@ -7,7 +7,7 @@ on:
|
||||||
- develop
|
- develop
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build-and-deploy:
|
deploy-frontend:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}
|
environment: ${{ github.ref == 'refs/heads/main' && 'production' || 'staging' }}
|
||||||
|
|
@ -38,3 +38,31 @@ jobs:
|
||||||
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
|
||||||
AWS_REGION: ${{ secrets.AWS_REGION }}
|
AWS_REGION: ${{ secrets.AWS_REGION }}
|
||||||
SOURCE_DIR: 'dist'
|
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
|
||||||
Loading…
Reference in New Issue
Block a user