-
-
Notifications
You must be signed in to change notification settings - Fork 70
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
ci: automatically deploy to GitHub Pages (#59)
* ci: automatically deploy to gh pages * fix: build script * fix: disable build on prs * test gh action testing: #59 * action should be only run once * fomat ci.yml * use original doc-site vite.config.ts Co-authored-by: csr632 <632882184@qq.com>
- Loading branch information
1 parent
74d63d7
commit cbae11f
Showing
2 changed files
with
39 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,38 @@ | ||
name: ci | ||
|
||
on: | ||
push: | ||
branches: [main, test-gh-action] | ||
|
||
jobs: | ||
build: | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
node-version: [16.x] | ||
|
||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
- uses: pnpm/action-setup@v2.0.1 | ||
with: | ||
version: '6' | ||
- name: Setup Node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: ${{ matrix.node-version }} | ||
cache: 'pnpm' | ||
- name: Install Dependencies | ||
run: pnpm install | ||
|
||
- name: Build | ||
run: pnpm build:docs | ||
|
||
- name: Deploy to GitHub Pages | ||
if: success() | ||
uses: crazy-max/ghaction-github-pages@v2 | ||
with: | ||
target_branch: gh-pages | ||
build_dir: doc-site/dist | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters