Update GitHub Actions workflow for Jekyll site #3
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Build and deploy Jekyll site to Pages | |
| on: | |
| push: | |
| branches: [ main ] # or your default branch | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| pages: write | |
| id-token: write | |
| concurrency: | |
| group: "pages" | |
| cancel-in-progress: true | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| # REQUIRED: configures the Pages deployment | |
| - name: Setup Pages | |
| uses: actions/configure-pages@v5 | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| ruby-version: '3.3' | |
| bundler-cache: true | |
| working-directory: jekyll-site | |
| - name: Install dependencies | |
| working-directory: jekyll-site | |
| run: bundle install | |
| - name: Build with Jekyll | |
| uses: actions/jekyll-build-pages@v1 | |
| with: | |
| source: ./jekyll-site # your site lives here | |
| destination: ./_site # output for upload | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| path: ./_site # artifact name defaults to github-pages | |
| deploy: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| name: github-pages | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| permissions: | |
| pages: write | |
| id-token: write | |
| steps: | |
| - id: deployment | |
| uses: actions/deploy-pages@v4 |