Publish Document #164
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 Document | |
| on: | |
| workflow_dispatch: # Allows manual trigger from GitHub UI | |
| push: | |
| branches: [master] # or master | |
| schedule: | |
| - cron: '0 0 * * *' | |
| permissions: | |
| contents: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| with: | |
| persist-credentials: false | |
| - name: Prepare build environment | |
| run: | | |
| sudo apt install python3-pip python3-dev python3-setuptools | |
| sudo pip3 install -U pygments==2.17.2 pymdown-extensions==10.14.3 | |
| sudo pip3 install mkdocs-exclude==1.0.2 | |
| sudo pip3 install mkdocs-material==9.6.8 | |
| sudo pip3 install python-frontmatter GitPython requests | |
| - name: Audit dependencies | |
| run: | | |
| sudo pip3 install pip-audit==2.10.0 | |
| pip-audit | |
| - name: Sync TRON TIPs | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
| run: python3 scripts/sync_tips.py | |
| - name: Build the document | |
| run: mkdocs build | |
| - name: Build and Deploy | |
| uses: JamesIves/github-pages-deploy-action@v4 | |
| with: | |
| token: ${{ secrets.GITHUB_TOKEN }} | |
| BRANCH: gh-pages # The branch the action should deploy to. | |
| FOLDER: site # The folder the action should deploy. |