website.yml 1011 B

1234567891011121314151617181920212223242526272829303132333435363738394041
  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. python scripts/build_references.py
  19. cd docs
  20. npm install retypeapp --global
  21. retype build
  22. ###################################################
  23. - name: Setup emsdk
  24. uses: mymindstorm/setup-emsdk@v12
  25. with:
  26. actions-cache-folder: 'emsdk-cache'
  27. - name: Compile
  28. run: |
  29. bash build_web.sh
  30. mv web docs/.retype/static
  31. ###################################################
  32. - uses: crazy-max/ghaction-github-pages@v3
  33. with:
  34. target_branch: gh-pages
  35. build_dir: docs/.retype
  36. env:
  37. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
  38. if: github.ref == 'refs/heads/main'