Skip to content

Release

Release #13

Workflow file for this run

name: Release
on:
repository_dispatch:
workflow_dispatch:
workflow_run:
workflows: ["Build"]
branches: [main]
types: [completed]
jobs:
build_and_deployment:
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-prod
restore-keys: rotion-prod
- 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
- name: Deploy to prod.cognanous.com by FTP
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_HOST }}
username: ${{ secrets.FTP_USER_PROD_EN }}
password: ${{ secrets.FTP_PASS_PROD_EN }}
local-dir: ./out/
exclude: |
ogimages/*-ja-*.png
- name: Run next build for japanese
run: |
yarn build
env:
NEXT_PUBLIC_LANG: ja
- name: Deploy to prod.cognano.co.jp by FTP
uses: SamKirkland/[email protected]
with:
server: ${{ secrets.FTP_HOST }}
username: ${{ secrets.FTP_USER_PROD_JA }}
password: ${{ secrets.FTP_PASS_PROD_JA }}
local-dir: ./out/
exclude: |
ogimages/*-en-*.png