Skip to content

Commit

Permalink
chore: ci/cd
Browse files Browse the repository at this point in the history
  • Loading branch information
kevin.zhang committed Apr 18, 2024
1 parent c04e398 commit 4804aa1
Show file tree
Hide file tree
Showing 4 changed files with 277 additions and 2 deletions.
31 changes: 31 additions & 0 deletions .github/workflows/gh-pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: gp-pages
on:
push:
branches:
- main

jobs:
build-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Set-up Node
uses: actions/setup-node@v1
with:
node-version: "18.15.0"
- name: Install pnpm
run: npm install -g pnpm
- name: Install dependencies
run: pnpm i
working-directory: ./sites
- name: Build gh-pages
run: pnpm docs:build
working-directory: ./sites
- name: Deploy to gh-pages
uses: crazy-max/ghaction-github-pages@v1
with:
target_branch: gh-pages
build_dir: sites/docs/dist
env:
GITHUB_TOKEN: ${{ secrets.REPO_TOKEN }}
2 changes: 1 addition & 1 deletion sites/docs/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
home: true
heroImage: /hero.png
actions:
- text: Get Started →
- text: Get Started test
link: /guide/
type: primary
features:
Expand Down
5 changes: 4 additions & 1 deletion sites/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -10,12 +10,15 @@
"@vue/tsconfig": "^0.1.3",
"@vuepress/bundler-vite": "2.0.0-rc.9",
"@vuepress/theme-default": "2.0.0-rc.25",
"gh-pages": "^6.1.1",
"vue": "^3.4.23",
"vue-router": "^4.3.1",
"vuepress": "2.0.0-rc.9"
},
"scripts": {
"docs:dev": "vuepress dev docs",
"docs:build": "vuepress build docs"
"docs:build": "vuepress build docs",
"predeploy": "pnpm docs:build",
"deploy": "gh-pages -d docs/.vuepress/dist"
}
}
Loading

0 comments on commit 4804aa1

Please sign in to comment.