Skip to content

Commit

Permalink
other: #81 🔹 deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
Ubugeeei committed Aug 11, 2023
1 parent 8954801 commit b30741e
Show file tree
Hide file tree
Showing 2 changed files with 52 additions and 0 deletions.
51 changes: 51 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
name: Deploy chibivue Book to Pages

on:
push:
branches: [81-deploy-github-pages, 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: 18
- name: Setup Pages
uses: actions/configure-pages@v3
- name: Install dependencies
run: pnpm install
- name: Build with VitePress
run: pnpm run book:build
- name: Upload artifact
uses: actions/upload-pages-artifact@v2
with:
path: book/online-book/.vitepress/dist

deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
needs: build
runs-on: ubuntu-latest
name: Deploy
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v2
1 change: 1 addition & 0 deletions .vscode/settings.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,6 +10,7 @@
"RCDATA",
"unref",
"vdom",
"vitepress",
"vnode",
"Vnodes"
]
Expand Down

0 comments on commit b30741e

Please sign in to comment.