feat: 添加安装页面及相关样式,支持Windows、macOS、Linux和Docker多种安装方式的详细指南 #3
This file contains hidden or 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
| name: Deploy Website | |
| on: | |
| push: | |
| branches: [ main ] | |
| paths: | |
| - 'servergo-website/**' | |
| tags: | |
| - 'v*' # 添加对标签的响应 | |
| # 允许手动触发 | |
| workflow_dispatch: | |
| permissions: | |
| contents: write | |
| jobs: | |
| build-and-deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| cache-dependency-path: 'servergo-website/package-lock.json' | |
| - name: Install Dependencies | |
| run: | | |
| cd servergo-website | |
| npm ci | |
| - name: Build Website | |
| run: | | |
| cd servergo-website | |
| npm run build:pages | |
| - name: Deploy to GitHub Pages | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| branch: gh-pages | |
| folder: servergo-website/dist | |
| clean: true |