website.yml 898 B

123456789101112131415161718192021222324252627282930313233343536
  1. name: website
  2. on:
  3. push:
  4. branches: [ main ]
  5. pull_request:
  6. branches: [ main ]
  7. jobs:
  8. build_web:
  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. npm install retypeapp --global
  17. retype build
  18. ###################################################
  19. - name: Setup emsdk
  20. uses: mymindstorm/setup-emsdk@v12
  21. with:
  22. version: 3.1.25
  23. actions-cache-folder: 'emsdk-cache'
  24. - name: Compile
  25. run: |
  26. python3 build.py web
  27. mv web .retype/static
  28. ###################################################
  29. - uses: crazy-max/ghaction-github-pages@v3
  30. with:
  31. target_branch: gh-pages
  32. build_dir: .retype
  33. env:
  34. GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}