Skip to content

Commit

Permalink
Merge pull request #4 from aaronlamz/dev
Browse files Browse the repository at this point in the history
add deploy
  • Loading branch information
aaronlamz authored Aug 22, 2024
2 parents 57bd0f8 + 076598d commit 3dc7bab
Show file tree
Hide file tree
Showing 3 changed files with 35 additions and 2 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- main # 或者你正在使用的其他主分支
- dev

permissions:
contents: write # 确保 GITHUB_TOKEN 有写权限
pages: write

jobs:
deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3

- name: Install dependencies
run: yarn install # 或者 npm install

- name: Build project
run: yarn build # 或者 npm run build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./dist
# destination_dir: navpress # 部署到 navpress 子目录,不指定就是根目录
# cname: aaronlamz.github.io # 可选: 如果你需要自定义域名
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
# NavPress

[![npm version](https://img.shields.io/npm/v/navpress.svg)](https://www.npmjs.com/package/navpress)
[![Deploy to GitHub Pages](https://github.com/aaronlamz/navpress/actions/workflows/deploy.yml/badge.svg)](https://github.com/aaronlamz/navpress/actions/workflows/deploy.yml)

**NavPress** is a CLI tool for generating static navigation websites. It allows you to quickly build a navigation site through a configuration file, supporting both development and production modes.

Expand All @@ -13,7 +14,7 @@
- Integrates with Tailwind CSS and Vue.js.

## Preview
![demo](./demo.png)
[View Demo](https://aaronlamz.github.io/navpress/)

## Installation

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@
"keywords": ["navpress"],
"author": "aaronlamz",
"engines": {
"node": ">=20"
"node": ">=18"
},
"engineStrict": true,
"license": "MIT",
Expand Down

0 comments on commit 3dc7bab

Please sign in to comment.