Skip to content

Commit

Permalink
Merge pull request #97 from chvmvd/update-github-actions
Browse files Browse the repository at this point in the history
Update GitHub actions
  • Loading branch information
chvmvd authored Dec 10, 2022
2 parents c165aff + eb3aaa1 commit 48f4ffe
Show file tree
Hide file tree
Showing 8 changed files with 68 additions and 80 deletions.
16 changes: 10 additions & 6 deletions .github/workflows/black.yml
Original file line number Diff line number Diff line change
@@ -1,17 +1,21 @@
---
name: Black

on:
pull_request:
push:
branches:
- main
pull_request:
branches: [main, master]

jobs:
lint:
black:
name: Black
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: psf/black@stable
- name: Checkout Code
uses: actions/checkout@v3

- name: Run Black
uses: psf/black@stable
with:
options: '--exclude="docs/01python/07for/_samples/sum_1to100.ipynb"'
jupyter: true
16 changes: 10 additions & 6 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
---
name: Build and Deploy

on:
push:
branches:
- main
branches: main

permissions:
contents: write

jobs:
build-and-deploy:
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
name: Build and Deploy
concurrency: ci-${{ github.ref }}
runs-on: ubuntu-latest
steps:
- name: Checkout 🛎️
- name: Checkout Code
uses: actions/checkout@v3

- name: Install and Build 🔧 # This example project is built using npm and outputs the result to the 'build' folder. Replace with the commands required to build your project, or remove this step entirely if your site is pre-built.
- name: Install and Build 🔧
run: |
npm ci
npm run build
Expand All @@ -22,4 +26,4 @@ jobs:
uses: JamesIves/github-pages-deploy-action@v4
with:
clean-exclude: pr-preview/
folder: build # The folder the action should deploy.
folder: build
16 changes: 11 additions & 5 deletions .github/workflows/eslint.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
---
name: ESLint

on:
pull_request:
push:
branches:
- main
pull_request:
branches: [main, master]

jobs:
build:
eslint:
name: ESLint
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Checkout Code
uses: actions/checkout@v3

- name: Install modules
run: npm ci

- name: Run ESLint
run: npx eslint . --ext .js,.jsx,.ts,.tsx
49 changes: 0 additions & 49 deletions .github/workflows/linter.yml

This file was deleted.

17 changes: 7 additions & 10 deletions .github/workflows/prettier.yml
Original file line number Diff line number Diff line change
@@ -1,25 +1,22 @@
---
name: Prettier

# This action works with pull requests and pushes
on:
pull_request:
push:
branches:
- main
pull_request:
branches: [master, main]

jobs:
prettier:
name: Prettier
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout Code
uses: actions/checkout@v3
with:
# Make sure the actual branch is checked out when running on pull requests
ref: ${{ github.head_ref }}

- name: Prettify code
- name: Run Prettier
uses: creyD/[email protected]
with:
# This part is also where you can pass other options, for example:
prettier_options: --write .
8 changes: 5 additions & 3 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
---
name: Deploy PR previews

on:
Expand All @@ -12,10 +13,11 @@ concurrency: preview-${{ github.ref }}

jobs:
deploy-preview:
runs-on: ubuntu-20.04
name: Deploy PR previews
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Checkout Code
uses: actions/checkout@v3

- name: Install and Build
run: |
Expand Down
24 changes: 24 additions & 0 deletions .github/workflows/super_linter.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
---
name: Super Linter

on:
push:
pull_request:
branches: [master, main]

jobs:
super-linter:
name: Super Linter
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v3
with:
fetch-depth: 0

- name: Run Super Linter
uses: github/super-linter@v4
env:
VALIDATE_ALL_CODEBASE: false
DEFAULT_BRANCH: main
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
2 changes: 1 addition & 1 deletion docs/03extras/04website/02docusaurus/index.mdx
Original file line number Diff line number Diff line change
Expand Up @@ -176,7 +176,7 @@ import LifeGame from "@site/src/components/LifeGame/LifeGame";
:::

:::tip
Docusaurus で数式を表示するには、以下のようにします。(2022年12月時点[Docusaurus の公式サイトの説明](https://docusaurus.io/docs/markdown-features/math-equations)を参考にしてください。
Docusaurus で数式を表示するには、以下のようにします。(2022 年 12 月時点[Docusaurus の公式サイトの説明](https://docusaurus.io/docs/markdown-features/math-equations)を参考にしてください。

1. ターミナルで以下を実行して、プラグインをインストールします。

Expand Down

0 comments on commit 48f4ffe

Please sign in to comment.