website.yml 921 B

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