website.yml 1.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. name: website
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. permissions:
  8. contents: write
  9. jobs:
  10. deploy:
  11. runs-on: ubuntu-latest
  12. steps:
  13. - uses: actions/checkout@v4
  14. ###################################################
  15. - uses: actions/setup-node@v3.1.1
  16. - name: Retype build
  17. run: |
  18. cd docs
  19. npm install retypeapp --global
  20. retype build
  21. ###################################################
  22. - name: Setup emsdk
  23. uses: mymindstorm/setup-emsdk@v12
  24. with:
  25. version: 3.1.25
  26. actions-cache-folder: 'emsdk-cache'
  27. - name: Compile
  28. run: |
  29. python scripts/build_references.py
  30. bash build_web.sh
  31. mv web docs/.retype/static
  32. ###################################################
  33. - uses: crazy-max/ghaction-github-pages@v3
  34. with:
  35. target_branch: gh-pages
  36. build_dir: docs/.retype
  37. env:
  38. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  39. if: github.ref == 'refs/heads/main'