website.yml 960 B

1234567891011121314151617181920212223242526272829303132333435363738
  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. bash build_web.sh
  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 }}
  36. if: github.ref == 'refs/heads/main'