2024-10-04 21:09:04 +01:00
|
|
|
name: "Deploy Website"
|
2024-09-24 09:57:05 +01:00
|
|
|
|
2024-10-09 01:17:00 +01:00
|
|
|
on:
|
|
|
|
workflow_dispatch:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
paths:
|
|
|
|
- projects/website/**
|
|
|
|
- projects/common/**
|
|
|
|
- .gitea/kubernetes/website/**
|
|
|
|
- .gitea/workflows/deploy-website.yml
|
2024-09-24 09:57:05 +01:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
deploy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
2024-09-24 10:03:20 +00:00
|
|
|
uses: actions/checkout@v4
|
2024-09-24 09:57:05 +01:00
|
|
|
|
2024-09-24 10:37:30 +01:00
|
|
|
- name: Set up Docker Buildx
|
|
|
|
uses: docker/setup-buildx-action@v3
|
|
|
|
|
|
|
|
- name: Login to Docker Hub
|
|
|
|
uses: docker/login-action@v3
|
|
|
|
with:
|
|
|
|
username: ${{ secrets.REGISTRY_USERNAME }}
|
|
|
|
password: ${{ secrets.REGISTRY_TOKEN }}
|
|
|
|
registry: git.fascinated.cc
|
|
|
|
|
2024-09-24 10:43:05 +01:00
|
|
|
- name: Build Image
|
2024-09-24 10:37:30 +01:00
|
|
|
uses: docker/build-push-action@v6
|
|
|
|
with:
|
2024-10-02 17:39:12 +01:00
|
|
|
context: .
|
2024-10-08 15:33:41 +01:00
|
|
|
file: ./projects/website/Dockerfile
|
2024-09-24 10:37:30 +01:00
|
|
|
push: true
|
2024-09-24 11:05:05 +01:00
|
|
|
tags: |
|
2024-10-04 21:09:04 +01:00
|
|
|
git.fascinated.cc/fascinated/scoresaber-reloaded-website:${{ github.sha }}
|
|
|
|
git.fascinated.cc/fascinated/scoresaber-reloaded-website:latest
|
2024-09-24 10:37:30 +01:00
|
|
|
build-args: |
|
|
|
|
GIT_REV=${{ gitea.sha }}
|
2024-09-30 09:20:48 +01:00
|
|
|
SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
|
2024-09-24 09:57:05 +01:00
|
|
|
|
2024-09-24 10:30:32 +01:00
|
|
|
- name: Install kubectl
|
2024-09-24 10:34:09 +01:00
|
|
|
uses: azure/setup-kubectl@v4
|
|
|
|
id: install
|
2024-09-24 10:30:32 +01:00
|
|
|
|
2024-09-24 10:43:05 +01:00
|
|
|
- name: Setup Kubernetes Context
|
2024-09-24 10:23:53 +01:00
|
|
|
uses: azure/k8s-set-context@v4
|
2024-09-24 09:57:05 +01:00
|
|
|
with:
|
|
|
|
kubeconfig: ${{ secrets.KUBECONFIG }}
|
|
|
|
|
2024-09-24 10:43:05 +01:00
|
|
|
- name: Deploy to Kubernetes
|
|
|
|
uses: Azure/k8s-deploy@v5
|
2024-09-24 10:39:28 +01:00
|
|
|
with:
|
|
|
|
action: deploy
|
2024-09-24 10:46:00 +01:00
|
|
|
namespace: public-services
|
2024-09-24 10:39:28 +01:00
|
|
|
manifests: |
|
2024-10-04 21:46:49 +01:00
|
|
|
.gitea/kubernetes/website/deployment.yaml
|
|
|
|
.gitea/kubernetes/website/service.yaml
|
|
|
|
.gitea/kubernetes/website/ingress.yaml
|
2024-09-24 11:05:05 +01:00
|
|
|
images: |
|
2024-10-04 21:09:04 +01:00
|
|
|
git.fascinated.cc/fascinated/scoresaber-reloaded-website:${{ github.sha }}
|