Skip to content

⚡ 解析関連の実装を微高速化 #347

⚡ 解析関連の実装を微高速化

⚡ 解析関連の実装を微高速化 #347

name: Test run and Deploy to dist branch
on:
push:
branches-ignore:
- dist
pull_request:
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test-run-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Checkout dist branch
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions/checkout@v3
with:
ref: dist
path: ./dist
- name: Cache Node dependencies
uses: actions/cache@v3
with:
path: ./node_modules
key: ${{ runner.os }}-node-deps-${{ hashFiles('./yarn.lock') }}
- name: Cache SBT dependencies
uses: actions/cache@v3
with:
path: |
~/.sbt
~/.ivy2/cache
~/.ivy2/local/org.scalablytyped
./target/scala-*/scalajs-bundler/node_modules
key: ${{ runner.os }}-sbt-deps-${{ hashFiles('./build.sbt') }}
- name: Install Node dependencies
run: yarn install
- name: Build for production
run: yarn build
- name: Export environments
uses: peaceiris/[email protected]
id: envs
- name: Run
run: yarn test-gh-run
env:
ACTIONS_RUNTIME_TOKEN: ${{ steps.envs.outputs.ACTIONS_RUNTIME_TOKEN }}
ACTIONS_CACHE_URL: ${{ steps.envs.outputs.ACTIONS_CACHE_URL }}
INPUT_GITHUB_TOKEN: ${{ github.token }}
INPUT_IGNORELINTPATHPATTERN: test:ignore/**
INPUT_FORCEPASS: true
- name: Pre deploy
if: ${{ github.ref == 'refs/heads/main' }}
run: cp action.yml LICENSE README.md .gitignore dist
- name: Deploy to dist
if: ${{ github.ref == 'refs/heads/main' }}
uses: actions-js/[email protected]
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
branch: dist
directory: ./dist
empty: true
message: Compiled from ${{ github.SHA }}