static.yml 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  1. # Simple workflow for deploying static content to GitHub Pages
  2. name: Deploy static content to Pages
  3. on:
  4. # Runs on pushes targeting the default branch
  5. push:
  6. branches: ["main"]
  7. # Allows you to run this workflow manually from the Actions tab
  8. workflow_dispatch:
  9. # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
  10. permissions:
  11. contents: read
  12. pages: write
  13. id-token: write
  14. # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
  15. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
  16. concurrency:
  17. group: "pages"
  18. cancel-in-progress: false
  19. jobs:
  20. build_site:
  21. runs-on: ubuntu-latest
  22. steps:
  23. - name: Checkout
  24. uses: actions/checkout@v4
  25. - name: Install Bun
  26. run: |
  27. curl -fsSL https://bun.sh/install | bash
  28. echo 'export PATH="$HOME/.bun/bin:$PATH"' >> $GITHUB_ENV
  29. - name: Install dependencies
  30. run: bun install
  31. - name: build
  32. env:
  33. BASE_PATH: '/${{ github.event.repository.name }}'
  34. run: |
  35. bun run build
  36. - name: Upload Artifacts
  37. uses: actions/upload-pages-artifact@v3
  38. with:
  39. # this should match the `pages` option in your adapter-static options
  40. path: 'build/'
  41. deploy:
  42. needs: build_site
  43. runs-on: ubuntu-latest
  44. environment:
  45. name: github-pages
  46. url: ${{ steps.deployment.outputs.page_url }}
  47. steps:
  48. - name: Deploy to GitHub Pages
  49. id: deployment
  50. uses: actions/deploy-pages@v4