chore: bump version to 0.3.4 and update version retrieval method #14
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: Deploy Docs | |
| on: | |
| # Trigger: main or basic-dev branch has push | |
| push: | |
| branches: | |
| - main | |
| - basic-dev # You can test the effect on the development branch | |
| # Allow manual trigger (click the button on the Actions page) | |
| workflow_dispatch: | |
| # Permission setting: must give write permission to push to gh-pages branch | |
| permissions: | |
| contents: write | |
| jobs: | |
| deploy: | |
| runs-on: ubuntu-latest | |
| steps: | |
| # 1. Pull code | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 # Pull full history, some mkdocs plugins may need git information | |
| # 2. Set up Python environment | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| cache: "pip" | |
| # 3. Install dependencies | |
| - name: Install dependencies | |
| run: | | |
| python -m pip install --upgrade pip | |
| pip install . | |
| pip install mkdocs-material | |
| - name: Generate Puzzle Docs | |
| run: | | |
| python scripts/gen_docs.py | |
| - name: Build MkDocs | |
| run: mkdocs build | |
| - name: Deploy to GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v4 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./site | |
| force_orphan: true | |
| user_name: "github-actions[bot]" | |
| user_email: "41898282+github-actions[bot]@users.noreply.github.com" |