| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- name: website
- on:
- push:
- branches: [ main ]
- pull_request:
- branches: [ main ]
- workflow_dispatch:
- permissions:
- contents: read
- concurrency:
- group: website-${{ github.ref }}
- cancel-in-progress: true
- jobs:
- deploy:
- runs-on: ubuntu-latest
- steps:
- - uses: actions/checkout@v4
- ###################################################
- - uses: actions/setup-node@v4
- - name: Retype build
- run: |
- python scripts/gen_docs.py
- cd docs
- npm install retypeapp -g
- retype build
- ###################################################
- - name: Setup emsdk
- uses: mymindstorm/setup-emsdk@v14
- with:
- version: latest
- actions-cache-folder: 'emsdk-cache-v2'
- - name: Compile
- run: |
- bash build_web.sh
- mkdir -p docs/.retype/static
- mv web docs/.retype/static
- touch docs/.retype/.nojekyll
- ###################################################
- - name: Deploy to pocketpy.github.io
- uses: crazy-max/ghaction-github-pages@v3
- with:
- repo: pocketpy/pocketpy.github.io
- target_branch: main
- keep_history: true
- build_dir: docs/.retype
- jekyll: false
- env:
- # PAT with Contents: write permission on pocketpy/pocketpy.github.io.
- GH_PAT: ${{ secrets.WEBSITE_DEPLOY_TOKEN }}
- if: github.event_name != 'pull_request' && github.ref == 'refs/heads/main' && github.repository == 'pocketpy/pocketpy'
|