This repository has been archived on 2024-10-29. You can view files and clone it, but cannot push or open issues or pull requests.
scoresaber-reloadedv3/.gitea/workflows/deploy-website.yml

98 lines
2.5 KiB
YAML
Raw Normal View History

2024-10-19 08:36:06 +00:00
name: Deploy Website
2024-09-24 08:57:05 +00:00
2024-10-09 00:17:00 +00:00
on:
workflow_dispatch:
push:
branches:
- master
paths:
- projects/website/**
- projects/common/**
- .gitea/workflows/deploy-website.yml
2024-09-24 08:57:05 +00:00
jobs:
2024-10-19 08:36:06 +00:00
docker:
strategy:
matrix:
arch: ["ubuntu-latest"]
runs-on: ${{ matrix.arch }}
# Steps to run
2024-09-24 08:57:05 +00:00
steps:
2024-10-19 08:36:06 +00:00
# Checkout the repo
- name: Checkout
2024-09-24 10:03:20 +00:00
uses: actions/checkout@v4
2024-09-24 09:37:30 +00:00
with:
2024-10-19 08:36:06 +00:00
fetch-depth: 0
2024-09-24 09:37:30 +00:00
2024-10-19 08:36:06 +00:00
# Deploy to Dokku
- name: Push to dokku
uses: dokku/github-action@master
2024-09-24 09:37:30 +00:00
with:
2024-10-19 08:36:06 +00:00
git_remote_url: "ssh://dokku@51.158.63.74:22/ssr-website"
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
2024-09-24 09:30:32 +00:00
2024-10-19 08:36:06 +00:00
#name: "Deploy Website"
#
#on:
# workflow_dispatch:
# push:
# branches:
# - master
# paths:
# - projects/website/**
# - projects/common/**
# - .gitea/kubernetes/website/**
# - .gitea/workflows/deploy-website.yml
#
#jobs:
# deploy:
# runs-on: ubuntu-latest
# steps:
# - name: Checkout code
# uses: actions/checkout@v4
#
# - 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 Image
# uses: docker/build-push-action@v6
# with:
# context: .
# file: ./projects/website/Dockerfile
# push: true
# tags: |
# git.fascinated.cc/fascinated/scoresaber-reloaded-website:${{ github.sha }}
# git.fascinated.cc/fascinated/scoresaber-reloaded-website:latest
# build-args: |
# GIT_REV=${{ gitea.sha }}
# SENTRY_AUTH_TOKEN=${{ secrets.SENTRY_AUTH_TOKEN }}
#
# - name: Install kubectl
# uses: azure/setup-kubectl@v4
# id: install
#
# - name: Setup Kubernetes Context
# uses: azure/k8s-set-context@v4
# with:
# kubeconfig: ${{ secrets.KUBECONFIG }}
#
# - name: Deploy to Kubernetes
# uses: Azure/k8s-deploy@v5
# with:
# action: deploy
# namespace: public-services
# manifests: |
# .gitea/kubernetes/website/deployment.yaml
# .gitea/kubernetes/website/service.yaml
# .gitea/kubernetes/website/ingress.yaml
# images: |
# git.fascinated.cc/fascinated/scoresaber-reloaded-website:${{ github.sha }}