jekyll.yml 2.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465
  1. # This workflow uses actions that are not certified by GitHub.
  2. # They are provided by a third-party and are governed by
  3. # separate terms of service, privacy policy, and support
  4. # documentation.
  5. # Sample workflow for building and deploying a Jekyll site to GitHub Pages
  6. name: Deploy Jekyll site to Pages
  7. on:
  8. # Runs on pushes targeting the default branch
  9. push:
  10. branches: ["master"]
  11. # Allows you to run this workflow manually from the Actions tab
  12. workflow_dispatch:
  13. # Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
  14. permissions:
  15. contents: read
  16. pages: write
  17. id-token: write
  18. # Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
  19. # However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
  20. concurrency:
  21. group: "pages"
  22. cancel-in-progress: false
  23. jobs:
  24. # Build job
  25. build:
  26. runs-on: ubuntu-latest
  27. steps:
  28. - name: Checkout
  29. uses: actions/checkout@v4
  30. - name: Setup Ruby
  31. uses: ruby/setup-ruby@8575951200e472d5f2d95c625da0c7bec8217c42 # v1.161.0
  32. with:
  33. ruby-version: '3.1' # Not needed with a .ruby-version file
  34. bundler-cache: true # runs 'bundle install' and caches installed gems automatically
  35. cache-version: 0 # Increment this number if you need to re-download cached gems
  36. - name: Setup Pages
  37. id: pages
  38. uses: actions/configure-pages@v5
  39. - name: Build with Jekyll
  40. # Outputs to the './_site' directory by default
  41. run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
  42. env:
  43. JEKYLL_ENV: production
  44. - name: Upload artifact
  45. # Automatically uploads an artifact from the './_site' directory by default
  46. uses: actions/upload-pages-artifact@v3
  47. # Deployment job
  48. deploy:
  49. environment:
  50. name: github-pages
  51. url: ${{ steps.deployment.outputs.page_url }}
  52. runs-on: ubuntu-latest
  53. needs: build
  54. steps:
  55. - name: Deploy to GitHub Pages
  56. id: deployment
  57. uses: actions/deploy-pages@v4