Skip to content

Commit

Permalink
build: action
Browse files Browse the repository at this point in the history
  • Loading branch information
zhuba-Ahhh committed Aug 22, 2024
1 parent b022da8 commit c19b0cc
Show file tree
Hide file tree
Showing 17 changed files with 805 additions and 958 deletions.
50 changes: 50 additions & 0 deletions .github/workflows/pnpm.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
name: Build & Deploy

on:
push:
# main 分支有 push 时触发
branches: [main]

pull_request:
branches: [main]

jobs:
deploy:
# 指定虚拟机环境
runs-on: ${{ matrix.os }}

strategy:
matrix:
node-version: [lts/*]
os: [ubuntu-latest, windows-latest]
fail-fast: false

steps:
- uses: actions/checkout@v4

- name: Install pnpm
uses: pnpm/action-setup@v3
with:
version: 8

- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
registry-url: https://registry.npmjs.org/

- name: Install
run: pnpm install

- name: Build 📦
run: pnpm build

- name: Static HTML export with Next.js
run: npm run export

- name: Deploy 🚀
if: ${{ matrix.os == 'ubuntu-latest' }}
uses: JamesIves/[email protected]
with:
branch: gh-pages
folder: out
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2024 Rush

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
2 changes: 1 addition & 1 deletion next.config.mjs
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
/** @type {import('next').NextConfig} */
const nextConfig = {};
const nextConfig = {output: 'export'};

export default nextConfig;
11 changes: 7 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -3,17 +3,20 @@
"version": "0.1.0",
"private": true,
"scripts": {
"dev": "next dev",
"build": "next build",
"dev": "pnpm clean && next dev",
"build": "pnpm clean && next build",
"start": "next start",
"lint": "next lint"
"lint": "next lint",
"export": "next export",
"clean": "rm -rf .next"
},
"dependencies": {
"framer-motion": "^11.3.29",
"next": "14.2.6",
"next-themes": "^0.3.0",
"react": "^18",
"react-dom": "^18"
"react-dom": "^18",
"react-icons": "^5.3.0"
},
"devDependencies": {
"@types/node": "^20",
Expand Down
Loading

0 comments on commit c19b0cc

Please sign in to comment.