Skip to content
This repository was archived by the owner on May 25, 2024. It is now read-only.

update Node.js #246

Merged
merged 2 commits into from
Apr 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ on:
- main

env:
NODE_VERSION: 16.x
NODE_VERSION: 20.x

jobs:
lint:
Expand Down
123 changes: 62 additions & 61 deletions .github/workflows/vitepress.yml
Original file line number Diff line number Diff line change
@@ -1,68 +1,69 @@
name: VitePress CI/CD
# TODO:
# name: VitePress CI/CD

on:
push:
branches:
- main
paths:
- .github/workflows/vitepress.yml
- 'docs/**'
pull_request:
branches:
- main
paths:
- .github/workflows/vitepress.yml
- 'docs/**'
workflow_dispatch:
# on:
# push:
# branches:
# - main
# paths:
# - .github/workflows/vitepress.yml
# - 'docs/**'
# pull_request:
# branches:
# - main
# paths:
# - .github/workflows/vitepress.yml
# - 'docs/**'
# workflow_dispatch:

permissions:
pages: write
id-token: write
# permissions:
# pages: write
# id-token: write

concurrency:
group: pages
cancel-in-progress: false
# concurrency:
# group: pages
# cancel-in-progress: false

jobs:
build:
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
runs-on: ubuntu-latest
defaults:
run:
working-directory: docs
steps:
- uses: actions/checkout@v3
- name: Use Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
cache-dependency-path: docs/package-lock.json
- run: npm ci
- run: npm run build --if-present
- run: echo 'handson.vuejs-jp.org' > CNAME
working-directory: docs/.vitepress/dist
- uses: actions/upload-artifact@v3
with:
name: dist
path: docs/.vitepress/dist
# jobs:
# build:
# if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.action != 'closed')
# runs-on: ubuntu-latest
# defaults:
# run:
# working-directory: docs
# steps:
# - uses: actions/checkout@v3
# - name: Use Node.js
# uses: actions/setup-node@v3
# with:
# node-version: 20.x
# cache: npm
# cache-dependency-path: docs/package-lock.json
# - run: npm ci
# - run: npm run build --if-present
# - run: echo 'handson.vuejs-jp.org' > CNAME
# working-directory: docs/.vitepress/dist
# - uses: actions/upload-artifact@v3
# with:
# name: dist
# path: docs/.vitepress/dist

deploy:
if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' # PR 時はデプロイを実行しない
runs-on: ubuntu-latest
needs: build
# deploy:
# if: github.event_name == 'push' || github.event_name == 'workflow_dispatch' # PR 時はデプロイを実行しない
# runs-on: ubuntu-latest
# needs: build

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
# environment:
# name: github-pages
# url: ${{ steps.deployment.outputs.page_url }}

steps:
- uses: actions/download-artifact@v3
with:
name: dist
- uses: actions/upload-pages-artifact@v1
with:
path: .
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
# steps:
# - uses: actions/download-artifact@v3
# with:
# name: dist
# - uses: actions/upload-pages-artifact@v1
# with:
# path: .
# - name: Deploy to GitHub Pages
# id: deployment
# uses: actions/deploy-pages@v1
8 changes: 1 addition & 7 deletions docs/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,12 @@
"description": "",
"author": "Vue.js 日本ユーザーグループ",
"license": "MIT",
"main": "index.ts",
"scripts": {
"dev": "vitepress dev .",
"build": "vitepress build .",
"preview": "vitepress preview ."
},
"devDependencies": {
"@tsconfig/node20": "^20.1.3",
"vitepress": "^1.0.0-beta.5",
"vue": "^3.3.4"
},
"volta": {
"node": "18.16.1"
"vitepress": "^1.0.0-beta.5"
}
}
2 changes: 1 addition & 1 deletion docs/setup.md
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ node -v
バージョン番号が表示されたら、Node.js はインストールされていますので、セットアップの手順は飛ばして構いません。

```sh
v20.9.0
v20.12.2
```

::: warning 注意
Expand Down
Loading