feat: update python ver #9
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 and Deploy to GitHub Pages | |
| on: | |
| push: | |
| branches: | |
| - master | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: false | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v5 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v5 | |
| with: | |
| node-version: '22' | |
| - name: Install dependencies | |
| working-directory: web | |
| run: npm install | |
| - name: Compile TypeScript | |
| working-directory: web | |
| run: npm run build | |
| - name: Install Pandoc | |
| uses: pandoc/actions/setup@v1 | |
| - name: Create assets directory if not exists | |
| run: mkdir -p web/assets | |
| - name: Convert README.md to en-us.html | |
| run: pandoc README.md -t html -o web/assets/en-us.html | |
| - name: Convert README-zh-cn.md to zh-cn.html | |
| run: pandoc README-zh-cn.md -t html -o web/assets/zh-cn.html | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./web | |
| deploy: | |
| runs-on: ubuntu-latest | |
| needs: build | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |