Add the rest of license #10
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: Build Docs | |
| on: | |
| push: | |
| branches: | |
| - mkdoc | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| fetch-depth: 0 | |
| - name: Configure Git Credentials | |
| run: | | |
| git config user.name github-actions[bot] | |
| git config user.email toomore@ocf.tw | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v6 | |
| with: | |
| enable-cache: true | |
| # ----- #0 By using worktree ----- # | |
| - name: Build Mkdocs | |
| run: | | |
| git worktree add ./docs mkdoc-sites | |
| cd ./src/site_docs | |
| uv run mkdocs build -v -d ../../docs | |
| cd ../../docs | |
| touch .nojekyll | |
| echo 'oscvpass.ocf.tw' > CNAME | |
| if [ -n "$(git status --porcelain)" ]; then | |
| git add . | |
| git commit -a -m 'Deploy on ${{ github.ref_name }} ${{ github.sha }}' | |
| git push origin HEAD | |
| else | |
| echo "No changes to commit." | |
| fi |