Skip to content

GitHub Pages Build and Deploy #66

GitHub Pages Build and Deploy

GitHub Pages Build and Deploy #66

name: GitHub Pages Build and Deploy
on:
push:
branches:
- gh-pages
workflow_run:
workflows:
- Deploy
- Code Climate Report
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