Skip to content

Commit

Permalink
Merge pull request #265 from first-contributions-ja/revert-263-chore/…
Browse files Browse the repository at this point in the history
…format-yaml-#262

Revert "コード自動フォーマットのため、GitHub Actionsの設定を追加"
  • Loading branch information
kazzyfrog authored Jul 25, 2024
2 parents 23d5381 + 981bdb7 commit 10f389a
Showing 1 changed file with 8 additions and 46 deletions.
54 changes: 8 additions & 46 deletions .github/workflows/nextjs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,13 @@ on:

# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:


# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
Expand All @@ -20,45 +26,8 @@ concurrency:

jobs:
# Build job

format:
runs-on: ubuntu-latest

# Sets permissions of the GITHUB_TOKEN to commit and push the changed files back to the repository.
permissions:
contents: write

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: '20'
ref: ${{ github.head_ref }}

- name: Install dependencies
run: npm install

- name: Run Prettier
run: npm run format

- name: Run Linter
run: npm run lint

- uses: stefanzweifel/git-auto-commit-action@v5
with:
commit_message: "[GitHub Actions] コードをフォーマット"

build:
runs-on: ubuntu-latest
needs: format

# Sets permissions of the GITHUB_TOKEN to read the repository.
permissions:
contents: read

steps:
- name: Checkout
uses: actions/checkout@v4
Expand Down Expand Up @@ -118,14 +87,7 @@ jobs:
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write

steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
uses: actions/deploy-pages@v4

0 comments on commit 10f389a

Please sign in to comment.