Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
33 changes: 0 additions & 33 deletions .github/actions/recipes/deploy/action.yml

This file was deleted.

41 changes: 41 additions & 0 deletions .github/workflows/__deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,41 @@
name: Deploy

on:
workflow_call:
inputs:
branch:
required: true
type: string
keep-releases:
required: true
type: number
environment:
required: true
type: string

jobs:
deploy:
runs-on: ubuntu-latest
environment: ${{ inputs.environment }}
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Install PHP
uses: ./.github/actions/install-php

- name: Install Composer dependencies
run: composer install

- name: Deploy ${{ inputs.branch }} branch
uses: deployphp/action@6242095e7207facf115ac4439760356bc52760ac
env:
DEPLOY_BRANCH: ${{ inputs.branch }}
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
DEPLOY_DISCORD_CHANNEL_ID: ${{ secrets.DEPLOY_DISCORD_CHANNEL_ID }}
DEPLOY_DISCORD_CHANNEL_TOKEN: ${{ secrets.DEPLOY_DISCORD_CHANNEL_TOKEN }}
with:
private-key: ${{ secrets.DEPLOY_PRIVATE_KEY }}
dep: "deploy -o keep_releases=${{ inputs.keep-releases }}"

23 changes: 6 additions & 17 deletions .github/workflows/deploy-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,21 +12,10 @@ concurrency:

jobs:
deploy:
runs-on: ubuntu-latest
environment: dev
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Deploy dev branch
uses: ./.github/actions/recipes/deploy
env:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
DEPLOY_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }}
DEPLOY_DISCORD_CHANNEL_ID: ${{ secrets.DEPLOY_DISCORD_CHANNEL_ID }}
DEPLOY_DISCORD_CHANNEL_TOKEN: ${{ secrets.DEPLOY_DISCORD_CHANNEL_TOKEN }}
with:
branch: main
keep-releases: 3
uses: ./.github/workflows/__deploy.yml
secrets: inherit
with:
environment: dev
branch: main
keep-releases: 3

23 changes: 6 additions & 17 deletions .github/workflows/deploy-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,23 +25,12 @@ concurrency:

jobs:
deploy:
runs-on: ubuntu-latest
environment: production
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Deploy release branch
uses: ./.github/actions/recipes/deploy
env:
DEPLOY_HOST: ${{ secrets.DEPLOY_HOST }}
DEPLOY_USER: ${{ secrets.DEPLOY_USER }}
DEPLOY_PATH: ${{ secrets.DEPLOY_PATH }}
DEPLOY_PRIVATE_KEY: ${{ secrets.DEPLOY_PRIVATE_KEY }}
DEPLOY_DISCORD_CHANNEL_ID: ${{ secrets.DEPLOY_DISCORD_CHANNEL_ID }}
DEPLOY_DISCORD_CHANNEL_TOKEN: ${{ secrets.DEPLOY_DISCORD_CHANNEL_TOKEN }}
with:
branch: release
keep-releases: 5
uses: ./.github/workflows/__deploy.yml
secrets: inherit
with:
environment: production
branch: release
keep-releases: 5

tag:
runs-on: ubuntu-latest
Expand Down
8 changes: 3 additions & 5 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,6 @@ concurrency:
jobs:
unit-test:
runs-on: ubuntu-latest

services:
mariadb:
image: mariadb:11.0.5
Expand All @@ -26,21 +25,20 @@ jobs:
--health-interval=10s
--health-timeout=5s
--health-retries=3

steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683

- name: Install PHP
uses: ./.github/actions/tasks/install-php
uses: ./.github/actions/install-php

- name: Install Composer dependencies
uses: ./.github/actions/tasks/install-composer-deps
uses: ./.github/actions/install-composer-deps

- name: Prepare .env file
run: cp .env.ci .env

- name: Install npm dependencies
uses: ./.github/actions/tasks/install-npm-deps
uses: ./.github/actions/install-npm-deps

- name: Calculate front-end asset hash
id: get-assets-cache
Expand Down
1 change: 0 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
<p align="center">
<a href="https://opensource.org/licenses/MPL-2.0"><img src="https://img.shields.io/badge/License-MPL%202.0-brightgreen.svg" alt="License: MPL 2.0"></a>
<a href="https://github.com/projectcitybuild/web/actions/workflows/test.yml"><img src="https://github.com/projectcitybuild/web/actions/workflows/test.yml/badge.svg" alt="Build status"></a>
<a href="https://github.com/projectcitybuild/web/actions/workflows/test.yml"><img src="https://github.com/projectcitybuild/web/actions/workflows/lint.yml/badge.svg" alt="Linter status"></a>
</p>

---
Expand Down
4 changes: 1 addition & 3 deletions app/Core/Domains/Environment/Environment.php
Original file line number Diff line number Diff line change
Expand Up @@ -4,9 +4,7 @@

final class Environment
{
private function __construct()
{
}
private function __construct() {}

public static function getLevel(): EnvironmentLevel
{
Expand Down
183 changes: 0 additions & 183 deletions app/Core/Domains/Mojang/Api/MojangPlayerApi.php

This file was deleted.

Loading
Loading