-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (69 loc) · 1.91 KB
/
release.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
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