GitHub Pages Build and Deploy #250
This file contains 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: GitHub Pages Build and Deploy | |
on: | |
push: | |
branches: | |
- gh-pages | |
workflow_run: | |
workflows: | |
- Deploy | |
- Code Climate Report | |
- Delete Playwright Report for Branch | |
types: | |
- completed | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout GitHub Pages Branch | |
uses: actions/checkout@v4 | |
with: | |
ref: gh-pages | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: "3.4" | |
- name: Build Site | |
run: | | |
rm -rf .bundle | |
rm -rf Gemfile.lock | |
bundle install --no-deployment | |
bundle exec jekyll build | |
- name: Upload static files as artifact | |
id: deployment | |
uses: actions/upload-pages-artifact@v3 | |
deploy: | |
needs: build | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |