update #163
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: publish site | |
| # 触发条件 | |
| on: | |
| push: | |
| branches: | |
| - main | |
| # workflow 的具体内容 | |
| jobs: | |
| deploy: | |
| # 创建一个 Ubuntu 容器 | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 先打开 main 分支 | |
| - uses: actions/checkout@v2 | |
| # 再安装 Python 和相关环境 | |
| - uses: actions/setup-python@v2 | |
| with: | |
| python-version: 3.x | |
| # 使用包管理工具 pip 安装 mkdocs-material | |
| - run: pip install mkdocs-material mkdocs-video | |
| # 使用 mkdocs-material 构建网站并部署到 gh-pages 分支 | |
| - run: mkdocs gh-deploy --force | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |