Staging #31
Workflow file for this run
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
name: Staging | ||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
workflows: ["Build"] | ||
types: [completed] | ||
jobs: | ||
install-packages: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setups | ||
- name: Install packages | ||
run: yarn install | ||
build-english: | ||
needs: install-package | ||
Check failure on line 19 in .github/workflows/staging.yml GitHub Actions / StagingInvalid workflow file
|
||
runs-on: ubuntu-latest | ||
env: | ||
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | ||
ROTION_INCREMENTAL_CACHE: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setups | ||
- name: Run next build for english | ||
run: yarn build | ||
env: | ||
NEXT_PUBLIC_LANG: en | ||
BUILD_ENV: staging | ||
- name: Save html | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: english-out-stag | ||
path: out | ||
deploy-english: | ||
needs: build-english | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download html | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: english-out-stag | ||
path: out | ||
- 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 | ||
build-japanese: | ||
needs: build-english | ||
runs-on: ubuntu-latest | ||
env: | ||
NOTION_TOKEN: ${{ secrets.NOTION_TOKEN }} | ||
ROTION_INCREMENTAL_CACHE: true | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: ./.github/actions/setups | ||
- name: Run next build for japanese | ||
run: yarn build | ||
env: | ||
NEXT_PUBLIC_LANG: ja | ||
BUILD_ENV: staging | ||
- name: Save html | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: japanese-out-stag | ||
path: out | ||
deploy-japanese: | ||
needs: build-english | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Download html | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: japanese-out-stag | ||
path: out | ||
- name: Deploy to stag.cognano.co.jp by FTP | ||
uses: SamKirkland/[email protected] | ||
with: | ||
server: ${{ secrets.FTP_HOST }} | ||
username: ${{ secrets.FTP_USER_STAG_JA }} | ||
password: ${{ secrets.FTP_PASS_STAG_JA }} | ||
local-dir: ./out/ | ||
exclude: | | ||
ogimages/*-en-*.png |