testingggggggg
Some checks failed
Deploy / deploy (push) Failing after 56s

This commit is contained in:
Lee 2024-09-24 09:57:05 +01:00
parent d2e826c83f
commit d891d0be13
6 changed files with 75 additions and 85 deletions

View File

@ -1,21 +0,0 @@
name: "Deploy SSR"
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-22.04
steps:
- name: Cloning repo
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Push to dokku
uses: dokku/github-action@master
with:
git_remote_url: "ssh://dokku@10.0.50.65:22/ssr"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}

View File

@ -1,29 +0,0 @@
---
kind: pipeline
type: kubernetes
name: ssr-deploy
steps:
# - name: Build Docker Image
# image: plugins/docker
# settings:
# registry: git.fascinated.cc
# repo: git.fascinated.cc/fascinated/scoresaber-reloaded
# username:
# from_secret: username
# password:
# from_secret: token
# tags:
# - latest
- name: Deploy SSR
image: danielgormly/drone-plugin-kube:0.2.0
settings:
build_number: ${DRONE_BUILD_NUMBER}
template: deployment.yaml
ca:
from_secret: k8s_crt
server:
from_secret: k8s_server
token:
from_secret: k8s_token

View File

@ -29,38 +29,3 @@ spec:
limits:
cpu: 1000m # 1 vCPU
memory: 200Mi
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: scoresaber-reloaded-ingress
namespace: public-services
annotations:
kubernetes.io/ingress.class: traefik-external
spec:
entryPoints:
- websecure
routes:
- match: Host(`ssr-staging.fascinated.cc`)
kind: Rule
middlewares:
- name: default-headers
namespace: traefik
services:
- name: scoresaber-reloaded-service
port: 3000
tls:
secretName: fascinated-cc
---
apiVersion: v1
kind: Service
metadata:
name: scoresaber-reloaded-service
namespace: public-services
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
selector:
app: scoresaber-reloaded

View File

@ -0,0 +1,22 @@
---
apiVersion: traefik.io/v1alpha1
kind: IngressRoute
metadata:
name: scoresaber-reloaded-ingress
namespace: public-services
annotations:
kubernetes.io/ingress.class: traefik-external
spec:
entryPoints:
- websecure
routes:
- match: Host(`ssr-staging.fascinated.cc`)
kind: Rule
middlewares:
- name: default-headers
namespace: traefik
services:
- name: scoresaber-reloaded-service
port: 3000
tls:
secretName: fascinated-cc

View File

@ -0,0 +1,13 @@
---
apiVersion: v1
kind: Service
metadata:
name: scoresaber-reloaded-service
namespace: public-services
spec:
type: ClusterIP
ports:
- port: 3000
targetPort: 3000
selector:
app: scoresaber-reloaded

View File

@ -0,0 +1,40 @@
name: "Deploy"
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2
- 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
- name: Build and push
uses: docker/build-push-action@v6
with:
push: true
tags: fascinated/scoresaber-reloaded:latest
- name: Set up Kubectl
uses: azure/k8s-set-context@v1
with:
kubeconfig: ${{ secrets.KUBECONFIG }}
- name: Deploy
run: |
kubectl apply -f ./gitea/kubernetes/deployment.yaml
kubectl apply -f ./gitea/kubernetes/service.yaml
kubectl apply -f ./gitea/kubernetes/ingress.yaml