1
0
mirror of https://github.com/one-among-us/data.git synced 2024-11-14 07:14:52 +08:00
one-among-us-data/.github/workflows/generator.yml

52 lines
1.2 KiB
YAML
Raw Normal View History

2021-11-13 03:05:05 +08:00
name: Generator
2021-11-13 02:56:41 +08:00
on:
push:
branches: [ main ]
workflow_dispatch:
# One generator at a time
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
2021-11-13 02:56:41 +08:00
jobs:
build:
runs-on: ubuntu-latest
steps:
2022-03-21 00:53:16 +08:00
- name: Checkout
2022-08-30 21:52:20 +08:00
uses: actions/checkout@v3
2022-03-21 00:53:16 +08:00
- name: Setup Node
2022-08-30 21:52:20 +08:00
uses: actions/setup-node@v3
2021-11-13 02:56:41 +08:00
with:
2022-08-30 21:52:20 +08:00
# Upgrading to 16.17.0 result in ERR_LOADER_CHAIN_INCOMPLETE issue.
node-version: 16.16.0
2022-03-21 00:53:16 +08:00
- name: Cache node_modules
2022-08-30 21:52:20 +08:00
uses: actions/cache@v3
2022-03-21 00:53:16 +08:00
id: cache
2021-11-13 03:05:05 +08:00
with:
2022-03-21 00:53:16 +08:00
path: node_modules
key: ${{ runner.os }}-node-${{ hashFiles('yarn.lock') }}
restore-keys: ${{ runner.os }}-node-
2022-08-30 21:52:20 +08:00
2022-03-21 00:53:16 +08:00
- name: Install Dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: yarn install --production --frozen-lockfile
2022-08-30 21:52:20 +08:00
2022-03-21 00:53:16 +08:00
- name: Build
run: yarn build
2022-08-30 21:52:20 +08:00
- name: Deploy to github pages
uses: JamesIves/github-pages-deploy-action@v4
with:
branch: gh-pages
folder: dist