Skip to content

Commit

Permalink
Merge pull request #30 from Mikage-Server/develop
Browse files Browse the repository at this point in the history
Develop
  • Loading branch information
takara2314 committed Aug 21, 2023
2 parents 2869f66 + 8adf8db commit b7a5541
Show file tree
Hide file tree
Showing 13 changed files with 404 additions and 3 deletions.
21 changes: 21 additions & 0 deletions .github/createEnviron.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
import fs from 'fs';

// 環境変数をコマンドラインから取得
// DISCORD_CLIENT_IDはstringとしてパース (整数型にキャストされると不具合を起こすため)
const vars = require('minimist')(process.argv.slice(2), { string: ['DISCORD_CLIENT_ID'] });
delete vars._;

// 環境変数ファイルに書き込む内容を作成
let content: string = '';
Object.keys(vars).forEach((key) => {
content += `${key}=${vars[key]}\n`;
});

// 環境変数ファイルを作成
fs.writeFile('./.env.local', content, (err) => {
if (err) {
console.log(err);
} else {
console.log('The file is created successfully.');
}
});
49 changes: 49 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,49 @@
name: Deploy

on:
push:
branches:
- main

jobs:
backend-deploy:
name: Deploy
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3

- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18

- name: Install dependencies
run: npm install

- name: Create .env.local (Environment variables file)
run: >
npx ts-node .github/createEnviron.ts
--NEXT_PUBLIC_API_URL https://api.mikage.click/v1
--NEXT_PUBLIC_TWITTER_URL https://twitter.com/siojinja
--NEXT_PUBLIC_JMS_VOTE_URL https://minecraft.jp/servers/play.mikage.click
--NEXT_PUBLIC_MONOCRAFT_VOTE_URL https://monocraft.net/servers/tRkOlmkTq0r0lOX4Ir9c/vote
--NEXT_PUBLIC_SITE_URL https://mikage.click
--NEXTAUTH_URL https://mikage.click
--NEXTAUTH_URL_INTERNAL https://localhost:3000
--NEXTAUTH_SECRET ${{ secrets.NEXTAUTH_SECRET }}
--DISCORD_CLIENT_ID ${{ secrets.DISCORD_CLIENT_ID }}
--DISCORD_CLIENT_SECRET ${{ secrets.DISCORD_CLIENT_SECRET }}
- name: Build app
run: npm run build

- id: auth
uses: google-github-actions/auth@v1
with:
credentials_json: ${{ secrets.GCP_SA_KEY }}

- name: Deploy to App Engine
uses: google-github-actions/deploy-appengine@v1
with:
project_id: ${{ secrets.GCP_PROJECT_ID }}
deliverables: app.yaml
2 changes: 1 addition & 1 deletion app/home/letsJoin.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ const LetsJoin = () => {
今すぐ参加する!
</h1>
<span className="font-medium text-lg md:text-xl">
1.18.2 - 最新版 | play.mikage.click
1.20 - 最新版 | play.mikage.click
</span>
</div>
</Link>
Expand Down
30 changes: 30 additions & 0 deletions app/home/whatsNew.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@ const WhatsNew = () => {
<div className="w-full h-[26rem] overflow-x-auto">
<ul className="h-[calc(100%-0.5rem)] grid grid-flow-col gap-1">
<ItemSpringUpdate2023 />
<ItemVersionUpdate120 />
</ul>
</div>
</article>
Expand Down Expand Up @@ -73,4 +74,33 @@ const ItemSpringUpdate2023 = () => {
);
};

const ItemVersionUpdate120 = () => {
return (
<li className="mx-5 w-72 h-full rounded-lg overflow-hidden shadow-lg">
<Link href="/news/version-update-1-20">
<div className="w-full aspect-video text-5xl text-orange-700 bg-orange-200 flex flex-col items-center justify-center">
<img
src="/news/version-update-1-20/pr.webp"
alt="アプデPR"
className="w-full"
/>
</div>

<div className="p-5">
2023-08-22
<h3 className="text-yellow-700 text-xl font-medium">
1.20アップデートが行われました!
</h3>

<div className="mt-5 text-gray-500">
夏だ!海だ!1.20アップデートだ!
1.20の要素が見られるようになったのに加え、皆さんも領域を保護できるようになりましたよ。
</div>
</div>
</Link>
</li>
);
};


export default WhatsNew;
2 changes: 1 addition & 1 deletion app/newbie/banner.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ const ServerInfo = () => {
<span className="mr-7 md:mr-3 px-2 py-1 font-bold text-orange-800 bg-orange-300 rounded-lg">
Java
</span>
1.18.2 - 最新版
1.20 - 最新版
</div>
<div className="mt-2 md:mt-0 w-full md:w-1/2">
<span className="mr-3 px-2 py-1 font-bold text-lime-800 bg-lime-300 rounded-lg">
Expand Down
2 changes: 1 addition & 1 deletion app/newbie/howToParticipate.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@ const HowToConnect = () => {
<span className="mr-7 md:mr-3 px-2 py-1 font-bold text-yellow-800 bg-yellow-300 rounded-lg">
Java
</span>
1.18.2 - 最新版
1.20 - 最新版
</div>
<div className="mt-2 md:mt-0 w-full md:w-1/2">
<span className="mr-3 px-2 py-1 font-bold text-yellow-800 bg-yellow-300 rounded-lg">
Expand Down
50 changes: 50 additions & 0 deletions app/news/version-update-1-20/health.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
import Link from 'next/link';
import { Headline2, Headline3WithIndex } from '../../../components/headline';
import { Underline1 } from '../../../components/underline';

const Health = () => {
return (
<section className="mt-32 md:mt-48">
<Headline2
label="定期的な健康維持活動"
id="health"
/>

<article className="px-6 md:px-12">
<div className="mt-10 md:mt-5">
<Headline3WithIndex
label="サーバー全データのバックアップ"
index={1}
/>

<ul className="pl-5 list-disc">
<li>
ワールドから設定から何から何までバックアップしておきました。
</li>
</ul>
</div>

<div className="mt-32">
<Headline3WithIndex
label="ノーマル資源、ハード資源を新スポーンに"
index={2}
/>

<ul className="pl-5 list-disc">
<li>
せっかく1.20にアップデートしたけど、スポーン付近は1.18のままだって?そんなことはありません!
</li>
<li className="mt-3">
<Underline1>ノーマル資源、ハード資源の2つが、桜が満開の新スポーンになりました。</Underline1>すぐに1.20の世界にアクセスできます。
</li>
<li className="mt-3">
前のスポーンにも行きたいって?大丈夫。ロビーに設置してあるポータルの横に、前のスポーン行きのポータルを設置しました!
</li>
</ul>
</div>
</article>
</section>
);
};

export default Health;
92 changes: 92 additions & 0 deletions app/news/version-update-1-20/improved.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,92 @@
import Link from 'next/link';
import { Headline2, Headline3WithIndex } from '../../../components/headline';
import { Underline1 } from '../../../components/underline';

const Improved = () => {
return (
<section className="mt-32 md:mt-48">
<Headline2
label="改善/仕様変更"
id="improved"
/>

<article className="px-6 md:px-12">
<div className="mt-10 md:mt-5">
<Headline3WithIndex
label="新規の統合版プレイヤーの接続制限を撤廃"
index={1}
/>

<ul className="pl-5 list-disc">
<li>
これまで通り、<Underline1>新規の統合版プレイヤー</Underline1>が御景の世界に接続できるようになりました。
</li>
<li className="mt-3">
今後統合版のプレイ環境に問題があった場合、再度制限を行う可能性がありますのでご了承ください。
</li>
</ul>
</div>

<div className="mt-32">
<Headline3WithIndex
label="チート検知システムの精度向上"
index={2}
/>

<ul className="pl-5 list-disc">
<li>
<Underline1>特に統合版のチート検知システムの精度を向上</Underline1>し、確認している誤検知を修正しました。
</li>
<li className="mt-3">
また<Underline1>チートブロック機能の仕組みを改良</Underline1>し、一度の誤検知でプレイを妨害されることがなくなりました。
</li>
<li className="mt-3">
しかも、チーターはすぐに検知してキックしてくれる優れもの。
</li>
</ul>
</div>

<div className="mt-32">
<Headline3WithIndex
label="サーバーメモリを強化"
index={3}
/>

<ul className="pl-5 list-disc">
<li>
サバイバルサーバーに、メモリを<Underline1>約2倍</Underline1>割り当てるようになりました。
</li>
</ul>
</div>

<div className="mt-32">
<Headline3WithIndex
label="ラグを改善"
index={4}
/>

<ul className="pl-5 list-disc">
<li>
プレイデータの保管方法を改善した結果、<Underline1>ラグが少し軽減</Underline1>されました。
</li>
</ul>
</div>

<div className="mt-32">
<Headline3WithIndex
label="主要プラグインの日本語化"
index={5}
/>

<ul className="pl-5 list-disc">
<li>
保護機能やポータルなど、<Underline1>皆さんが目に触れる部分を中心に日本語化</Underline1>しました。
</li>
</ul>
</div>
</article>
</section>
);
};

export default Improved;
34 changes: 34 additions & 0 deletions app/news/version-update-1-20/layout.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,34 @@
import type { Metadata } from 'next';

const siteName = '1.20アップデートが行われました! | 御景サーバー';
const description = '夏だ!海だ!1.20アップデートだ!1.20の要素が見られるようになったのに加え、皆さんも領域を保護できるようになりましたよ。';

export const metadata: Metadata = {
title: siteName,
description: description,
openGraph: {
type: 'article',
locale: 'ja_JP',
url: process.env.NEXT_PUBLIC_SITE_URL,
title: siteName,
description: description,
images: [{
url: `${process.env.NEXT_PUBLIC_SITE_URL}/news/version-update-1-20/pr.webp`,
width: 1280,
height: 720,
alt: 'アプデPR',
type: 'image/webp'
}],
siteName: siteName
},
twitter: {
site: '@siojinja',
card: 'summary_large_image'
}
};

const Layout = ({ children }: { children: React.ReactNode }) => {
return children;
};

export default Layout;
25 changes: 25 additions & 0 deletions app/news/version-update-1-20/page.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
import Main from '../../main';
import Banner from '../banner';
import Health from './health';
import Improved from './improved';
import Summary from './summary';
import Updated from './updated';

const Page = () => {
return (
<Main>
<Banner
label="1.20アップデートが行われました!"
bannerImage="/news/version-update-1-20/pr.webp"
published="2023-08-22"
author="takara2314"
/>
<Summary />
<Updated />
<Health />
<Improved />
</Main>
);
};

export default Page;
26 changes: 26 additions & 0 deletions app/news/version-update-1-20/summary.tsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,26 @@
import { Headline2 } from '../../../components/headline';

const Summary = () => {
return (
<section>
<Headline2
label="概要"
id="summary"
/>

<article className="px-6 md:px-12">
<p>
夏だ!海だ!1.20アップデートだ!
</p>
<p>
1.19と1.20の要素が見られるようになったのに加え、皆さんも領域を保護できるようになりましたよ。
</p>
<p>
チート検出システムの精度も向上しちゃったり、ラグも軽減できちゃいました。
</p>
</article>
</section>
);
};

export default Summary;
Loading

0 comments on commit b7a5541

Please sign in to comment.