Update Ruby Dependencies #5
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 PR Preview | |
| on: | |
| pull_request: | |
| types: [ opened, synchronize ] | |
| branches: | |
| - main | |
| # Grant GITHUB_TOKEN the permissions required to deploy to GitHub Pages | |
| permissions: | |
| pages: write | |
| id-token: write | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v4 | |
| - name: Remove CNAME for Preview Deployment | |
| run: rm ./docs/CNAME | |
| - name: Setup Ruby and Install Gems | |
| uses: ruby/setup-ruby@v1 | |
| with: | |
| working-directory: ./docs | |
| bundler-cache: true | |
| - name: Build Jekyll Site | |
| working-directory: ./docs | |
| # Set the JEKYLL_ENV to production to mimic the final build | |
| env: | |
| JEKYLL_ENV: production | |
| run: bundle exec jekyll build | |
| - name: Upload artifact | |
| uses: actions/upload-pages-artifact@v3 | |
| with: | |
| # Tell the action where the built site is located | |
| path: ./docs/_site | |
| # This new job handles the deployment | |
| deploy: | |
| # It needs the 'build' job to finish first | |
| needs: build | |
| runs-on: ubuntu-latest | |
| environment: | |
| # Use the special GitHub Pages environment | |
| name: github-pages | |
| # Get the unique URL for the PR preview | |
| url: ${{ steps.deployment.outputs.page_url }} | |
| steps: | |
| - name: Deploy to GitHub Pages | |
| id: deployment | |
| uses: actions/deploy-pages@v4 |