Skip to content

Commit 727cdd2

Browse files
committed
chore: build and deploy to Github Pages
1 parent d00b25c commit 727cdd2

File tree

2 files changed

+52
-3
lines changed

2 files changed

+52
-3
lines changed

.github/workflows/github-pages.yaml

+49
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Build & Deploy to Github Pages
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["master"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
13+
permissions:
14+
contents: read
15+
pages: write
16+
id-token: write
17+
18+
# Allow one concurrent deployment
19+
concurrency:
20+
group: "pages"
21+
cancel-in-progress: true
22+
23+
jobs:
24+
build-and-deploy:
25+
environment:
26+
name: github-pages
27+
url: ${{ steps.deployment.outputs.page_url }}
28+
concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
29+
runs-on: ubuntu-latest
30+
steps:
31+
- name: Checkout 🛎️
32+
uses: actions/checkout@v3
33+
34+
- name: Configure GitHub Pages 📄
35+
uses: actions/configure-pages@v2
36+
37+
- name: Install and Build 🛠️
38+
run: |
39+
npm ci
40+
npm run build
41+
42+
- name: Upload artifacts 📁
43+
uses: actions/upload-pages-artifact@v1
44+
with:
45+
path: .vitepress/dist
46+
47+
- name: Deploy to GitHub Pages 🚀
48+
id: deployment
49+
uses: actions/deploy-pages@v1

package.json

+3-3
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,8 @@
11
{
22
"scripts": {
3-
"docs:dev": "vitepress dev",
4-
"docs:build": "vitepress build",
5-
"docs:preview": "vitepress preview"
3+
"dev": "vitepress dev",
4+
"build": "vitepress build",
5+
"preview": "vitepress preview"
66
},
77
"devDependencies": {
88
"vitepress": "^1.5.0"

0 commit comments

Comments
 (0)