deploy-h5.yml 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950
  1. name: Deploy Pages
  2. on:
  3. # Runs on pushes targeting the default branch
  4. push:
  5. branches: ['main']
  6. # Allows you to run this workflow manually from the Actions tab
  7. workflow_dispatch:
  8. # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
  9. permissions:
  10. contents: read
  11. pages: write
  12. id-token: write
  13. jobs:
  14. # Build job
  15. build:
  16. runs-on: ubuntu-latest
  17. steps:
  18. - uses: actions/checkout@v4
  19. - uses: pnpm/action-setup@v2
  20. with:
  21. version: 8
  22. - uses: actions/setup-node@v4
  23. with:
  24. node-version: '18'
  25. cache: 'pnpm'
  26. - name: Install dependencies
  27. run: pnpm i
  28. - name: Build
  29. run: pnpm build:h5
  30. - name: Upload artifact
  31. uses: actions/upload-pages-artifact@v3
  32. with:
  33. path: ./dist/build/h5
  34. # Deployment job
  35. deploy:
  36. environment:
  37. name: github-pages
  38. url: ${{ steps.deployment.outputs.page_url }}
  39. runs-on: ubuntu-latest
  40. needs: build
  41. steps:
  42. - name: Deploy to GitHub Pages
  43. id: deployment
  44. uses: actions/deploy-pages@v4