website.yml 992 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. 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. 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'