修复原书电子版的issue链接 (#26) #154
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: Compile Latex | |
| on: [push, pull_request] | |
| jobs: | |
| build_latex: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Set up Git repository | |
| uses: actions/checkout@v3 | |
| - name: Compile LaTeX document | |
| uses: xu-cheng/latex-action@v3 | |
| with: | |
| root_file: move.tex | |
| texlive_version: 2020 | |
| latexmk_use_xelatex: true | |
| - name: Release | |
| uses: softprops/action-gh-release@v1 | |
| if: startsWith(github.ref, 'refs/tags/') | |
| with: | |
| files: move.pdf | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| - name: Copy to deploy directory | |
| run: | | |
| cp move.pdf docs/move.pdf | |
| - name: Build | |
| uses: OpenHUTB/actions-mkdocs@main | |
| with: | |
| mkdocs_version: 'latest' # option | |
| #mkdocs_version: '1.1' # option | |
| # 安装行内公式渲染的依赖(python-markdown-math) | |
| requirements: 'requirements.txt' # option | |
| configfile: 'mkdocs.yml' # option | |
| # 报错:remote: Permission to donghaiwang/neuro.git denied to github-actions[bot]. | |
| # 解决:启用 Settings -> Actions -> General -> Workflow permissions 中的 "Read and write permissions" | |
| - name: Deploy | |
| if: ${{ github.event_name == 'push' }} | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./site |