deploy-site.yml 908 B

12345678910111213141516171819202122232425262728293031323334353637383940414243
  1. name: Deploy site to GitHub Pages
  2. on:
  3. push:
  4. branches: [main]
  5. paths:
  6. - 'site/**'
  7. - '.github/workflows/deploy-site.yml'
  8. workflow_dispatch:
  9. # Allow GITHUB_TOKEN to deploy to Pages and verify the deployment origin.
  10. permissions:
  11. contents: read
  12. pages: write
  13. id-token: write
  14. # One deploy at a time; let an in-progress run finish.
  15. concurrency:
  16. group: pages
  17. cancel-in-progress: false
  18. jobs:
  19. build:
  20. runs-on: ubuntu-latest
  21. steps:
  22. - name: Checkout
  23. uses: actions/checkout@v4
  24. - name: Build with Astro
  25. uses: withastro/action@v3
  26. with:
  27. path: site
  28. node-version: 22
  29. deploy:
  30. needs: build
  31. runs-on: ubuntu-latest
  32. environment:
  33. name: github-pages
  34. url: ${{ steps.deployment.outputs.page_url }}
  35. steps:
  36. - name: Deploy to GitHub Pages
  37. id: deployment
  38. uses: actions/deploy-pages@v4