fix: 修复首页全宽布局 — 消除两侧白边和 Docsy 容器间距 #108
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: GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master # Set a branch to deploy | |
| pull_request: | |
| jobs: | |
| deploy: | |
| name: "Deploy Capa.io Pages" | |
| runs-on: ubuntu-22.04 | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| steps: | |
| - name: "Checkout source code" | |
| uses: actions/checkout@v4 | |
| with: | |
| submodules: recursive # Fetch the Docsy theme | |
| fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
| - name: "Setup Hugo" | |
| uses: peaceiris/actions-hugo@v2 | |
| with: | |
| hugo-version: '0.145.0' | |
| extended: true | |
| - name: "Setup Node" | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '20' | |
| cache: 'npm' | |
| - name: "Install project dependencies" | |
| run: npm ci | |
| - name: "Install Docsy theme dependencies" | |
| run: cd themes/docsy && npm install | |
| - name: "Create Hugo module directories for Docsy" | |
| run: node themes/docsy/tools/mkdirp-hugo-mod.js themes | |
| - name: "Build" | |
| run: hugo --gc --minify --destination docs | |
| - name: "Deploy" | |
| uses: peaceiris/actions-gh-pages@v3 | |
| if: ${{ github.ref == 'refs/heads/master' }} # Deploy in master branch only | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./docs |