Skip to content

Instantly share code, notes, and snippets.

@dirtyhenry
Created October 24, 2023 08:48
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dirtyhenry/d2131b16029c91ecb7c21be5c678211d to your computer and use it in GitHub Desktop.
Save dirtyhenry/d2131b16029c91ecb7c21be5c678211d to your computer and use it in GitHub Desktop.
Deploy Jekyll site on GitHub Pages
name: Deploy Website
on:
push:
branches:
- main
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
# 📜 https://docs.github.com/en/actions/using-workflows/events-that-trigger-workflows#workflow_dispatch
permissions:
contents: read
pages: write
id-token: write
# Allow one concurrent deployment
concurrency:
group: "pages"
cancel-in-progress: true
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: "3.0.2"
- name: Setup Pages
uses: actions/configure-pages@v2
- name: Build Documentation
run: |
make install
make build
- name: Upload Artifact
uses: actions/upload-pages-artifact@v1
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment