Skip to content

Merge pull request #53 from toio/fix-v2.4.0-1 #25

Merge pull request #53 from toio/fix-v2.4.0-1

Merge pull request #53 from toio/fix-v2.4.0-1 #25

Workflow file for this run

name: deploy
on:
push:
branches:
- main
paths:
- docs/**
- website/**
jobs:
publish:
runs-on: ubuntu-latest
environment:
name: github-pages
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Get yarn cache directory path
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache Node.js dependencies
uses: actions/cache@v2
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: Install Node.js dependencies
run: |
cd website
yarn --frozen-lockfile --prefer-offline
- name: Put .env file
run: echo "${{ secrets.ENV_FILE }}" > website/.env
- name: Build
run: |
cd website
yarn run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: website/build