Skip to content

Redirect Discord linking to connections page (#111) #140

Redirect Discord linking to connections page (#111)

Redirect Discord linking to connections page (#111) #140

name: production-deploy
on:
push:
branches:
- master
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
production-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Check out latest commit
uses: actions/checkout@v7
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Extract metadata (tags, labels) for Docker
id: meta
uses: docker/metadata-action@v6
with:
images: ghcr.io/osuakatsuki/akatsuki-api
- name: Build and push Docker image
uses: docker/build-push-action@v7
with:
context: .
file: ./Dockerfile
push: true
tags: |
ghcr.io/osuakatsuki/akatsuki-api:latest
ghcr.io/osuakatsuki/akatsuki-api:${{ github.sha }}
labels: ${{ steps.meta.outputs.labels }}
- name: Deploy to production
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.SERVER_HOST }}
username: root
key: ${{ secrets.SERVER_SSH_KEY }}
script: |
cd /opt/akatsuki
docker compose pull akatsuki-api
docker compose up -d akatsuki-api