-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #46 from cognano/rotion-upgrade
Replace to Rotion from Notionate and Some styles fixes
- Loading branch information
Showing
37 changed files
with
2,822 additions
and
2,753 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Build and Deploy to staging | ||
name: Build | ||
|
||
on: | ||
repository_dispatch: | ||
|
@@ -12,16 +12,16 @@ jobs: | |
runs-on: ubuntu-latest | ||
strategy: | ||
matrix: | ||
node-version: [18.x] | ||
node-version: [22.x] | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/checkout@v4 | ||
- name: Use Node.js ${{ matrix.node-version }} | ||
uses: actions/setup-node@v3 | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: yarn | ||
- name: Restore next cache | ||
uses: actions/cache@v3 | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.next/cache | ||
|
@@ -31,66 +31,5 @@ jobs: | |
- name: Run builds and deploys with ${{ matrix.node-version }} | ||
run: | | ||
yarn install | ||
yarn add sharp --ignore-engines | ||
yarn lint | ||
staging: | ||
runs-on: ubuntu-latest | ||
needs: [build] | ||
env: | ||
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | ||
NOTIONATE_INCREMENTAL_CACHE: true | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-node@v3 | ||
with: | ||
node-version: 18 | ||
cache: yarn | ||
- name: Restore next cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.next/cache | ||
key: nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
restore-keys: | | ||
nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- | ||
- name: Restore notionate cache | ||
uses: actions/cache@v3 | ||
with: | ||
path: | | ||
.cache | ||
public/images | ||
key: notionate-stag | ||
restore-keys: notionate-stag | ||
- name: Install packages | ||
run: | | ||
yarn install | ||
- name: Run next export | ||
run: | | ||
yarn build | ||
env: | ||
NEXT_PUBLIC_LANG: en | ||
BUILD_ENV: staging | ||
- name: Deploy to staging by FTP | ||
uses: SamKirkland/[email protected] | ||
with: | ||
server: ${{ secrets.FTPHOST }} | ||
username: ${{ secrets.FTPUSERNAME_STAG_EN }} | ||
password: ${{ secrets.FTPPASSWORD_STAG_EN }} | ||
local-dir: ./out/ | ||
exclude: | | ||
ogimages/*-ja-*.png | ||
- name: Run next export for japanese | ||
run: | | ||
yarn build | ||
env: | ||
NEXT_PUBLIC_LANG: ja | ||
BUILD_ENV: staging | ||
- name: Deploy to staging by FTP | ||
uses: SamKirkland/[email protected] | ||
with: | ||
server: ${{ secrets.FTPHOST }} | ||
username: ${{ secrets.FTPUSERNAME_STAG }} | ||
password: ${{ secrets.FTPPASSWORD_STAG }} | ||
local-dir: ./out/ | ||
exclude: | | ||
ogimages/*-en-*.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
name: Staging | ||
|
||
on: | ||
repository_dispatch: | ||
workflow_dispatch: | ||
workflow_run: | ||
workflows: ["Build"] | ||
types: [completed] | ||
|
||
jobs: | ||
staging: | ||
runs-on: ubuntu-latest | ||
env: | ||
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | ||
ROTION_INCREMENTAL_CACHE: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 22 | ||
cache: yarn | ||
- name: Restore next cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.next/cache | ||
key: nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}-${{ hashFiles('**.[jt]s', '**.[jt]sx') }} | ||
restore-keys: | | ||
nextjs-${{ hashFiles('**/package-lock.json', '**/yarn.lock') }}- | ||
- name: Restore rotion cache | ||
uses: actions/cache@v4 | ||
with: | ||
path: | | ||
.cache | ||
public/images | ||
public/ogimages | ||
key: rotion-stag | ||
restore-keys: rotion-stag | ||
- name: Install packages | ||
run: | | ||
yarn install | ||
yarn add sharp --ignore-engines | ||
- name: Run next build for english | ||
run: | | ||
yarn build | ||
env: | ||
NEXT_PUBLIC_LANG: en | ||
BUILD_ENV: staging | ||
- name: Deploy to stag.cognanous.com by FTP | ||
uses: SamKirkland/[email protected] | ||
with: | ||
server: ${{ secrets.FTP_HOST }} | ||
username: ${{ secrets.FTP_USER_STAG_EN }} | ||
password: ${{ secrets.FTP_PASS_STAG_EN }} | ||
local-dir: ./out/ | ||
exclude: | | ||
ogimages/*-ja-*.png | ||
- name: Run next build for japanese | ||
run: | | ||
yarn build | ||
env: | ||
NEXT_PUBLIC_LANG: ja | ||
BUILD_ENV: staging | ||
- name: Deploy to stag.cognano.co.jp by FTP | ||
uses: SamKirkland/[email protected] | ||
with: | ||
server: ${{ secrets.FTPHOST }} | ||
username: ${{ secrets.FTP_USER_STAG_JA }} | ||
password: ${{ secrets.FTP_PASS_STAG_JA }} | ||
local-dir: ./out/ | ||
exclude: | | ||
ogimages/*-en-*.png |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -52,4 +52,4 @@ const Language: React.FC<Props> = ({ children, top }) => { | |
) | ||
} | ||
|
||
export default Language | ||
export default Language |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -73,4 +73,4 @@ const NewsList: React.FC<Props> = ({ news }) => { | |
) | ||
} | ||
|
||
export default NewsList | ||
export default NewsList |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -105,4 +105,4 @@ const OgImage: FC<Props> = ({ title, desc, id }) => { | |
) | ||
} | ||
|
||
export default OgImage | ||
export default OgImage |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.