26/4/4 #130
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: Documentation | |
| on: | |
| push: | |
| branches: | |
| - master | |
| - main | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| jobs: | |
| deploy: | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/configure-pages@v5 | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v5 | |
| with: | |
| python-version: 3.x | |
| - run: pip install zensical | |
| # 生成 Ask AI 的 API Key 配置文件 | |
| - name: Generate GLM API Config | |
| run: | | |
| echo "window.GLM_API_KEY = '${{ secrets.GLM_API_KEY }}';" > docs/javascripts/glm-api-config.js | |
| - run: zensical build --clean | |
| - uses: actions/upload-pages-artifact@v4 | |
| with: | |
| path: site | |
| - uses: actions/deploy-pages@v4 | |
| id: deployment | |
| # IndexNow - 通知搜索引擎内容更新 | |
| - name: IndexNow | |
| uses: bojieyang/indexnow-action@v2 | |
| with: | |
| sitemap-location: 'https://wcowin.work/sitemap.xml' | |
| key: ${{ secrets.INDEXNOW_KEY }} |