Skip to content

Commit

Permalink
feat: configure GitHub Actions (#15)
Browse files Browse the repository at this point in the history
* configure gha

* lint setting
  • Loading branch information
ubugeeei authored Sep 16, 2024
1 parent 3a3e02f commit 6769c92
Show file tree
Hide file tree
Showing 4 changed files with 111 additions and 1 deletion.
38 changes: 38 additions & 0 deletions .github/workflows/check.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Check

on: push

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install dependencies
run: pnpm install
- name: check building
run: pnpm build
- name: check linting
run: pnpm lint
63 changes: 63 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,63 @@
name: Deploy Reading vuejs/core-vapor Book

on:
push:
branches: [main]

workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

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

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
fetch-depth: 0
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 20
- uses: pnpm/action-setup@v2
name: Install pnpm
with:
version: 9
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v3
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: pnpm install
- name: Build with VitePress
run: pnpm run build -- --base /reading-vuejs-core-vapor/
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: .vitepress/dist

deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
9 changes: 9 additions & 0 deletions rules/prh-punctuation-mark.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
version: 1

rules:
- expected:
pattern:
-
- expected:
pattern:
-
2 changes: 1 addition & 1 deletion src/ja/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ TBD

## Sponsors

もしよろしければ私の仕事を応援していただけると大変ありがたいです!
もしよろしければ私の仕事を応援していただけると大変ありがたいです!

https://github.com/sponsors/ubugeeei

Expand Down

0 comments on commit 6769c92

Please sign in to comment.