Repository navigation
feat: AIShell記事を公開 #194
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 Hugo to GitHub Pages | |
| on: | |
| push: | |
| branches: [main] | |
| # dev.toの状態台帳だけのbot commitでは再ビルドしない。 | |
| # articles/・同期/転載スクリプトの変更は検査対象に含める。 | |
| paths-ignore: | |
| - 'books/**' | |
| - 'crossposted-devto.json' | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: pages | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| with: | |
| submodules: true | |
| fetch-depth: 0 | |
| - name: Setup Hugo | |
| uses: peaceiris/actions-hugo@v3 | |
| with: | |
| hugo-version: '0.164.0' | |
| extended: true | |
| - name: Setup Node | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: '20' | |
| - name: Install pipeline test dependencies | |
| run: npm ci | |
| working-directory: .github/scripts | |
| - name: Test content pipeline | |
| run: npm test | |
| working-directory: .github/scripts | |
| - name: Validate content | |
| run: node tools/validate-content.mjs | |
| - name: Check Zenn synchronization | |
| run: node tools/zenn-sync/sync.mjs --check | |
| - name: Build | |
| run: hugo --minify | |
| - name: Validate rendered articles | |
| run: node tools/validate-content.mjs --rendered | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./public | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| needs: build | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |