website.yml 882 B

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