- Create GitHub Actions workflow for deploying documentation to GitHub Pages - Update README.md with documentation badge and link - Add missing gem dependency in docs/Gemfile - Configure Jekyll build and deployment process
64 lines
1.2 KiB
YAML
64 lines
1.2 KiB
YAML
name: Deploy Documentation to GitHub Pages
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- 'docs/**'
|
|
- '.github/workflows/deploy-docs.yml'
|
|
|
|
permissions:
|
|
contents: read
|
|
pages: write
|
|
id-token: write
|
|
|
|
# Allow only one concurrent deployment
|
|
concurrency:
|
|
group: "pages"
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup Ruby
|
|
uses: ruby/setup-ruby@v1
|
|
with:
|
|
ruby-version: '3.2'
|
|
bundler-cache: true
|
|
cache-version: 0
|
|
|
|
- name: Setup Pages
|
|
uses: actions/configure-pages@v4
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
cd docs
|
|
bundle install
|
|
|
|
- name: Build site
|
|
run: |
|
|
cd docs
|
|
bundle exec jekyll build
|
|
env:
|
|
JEKYLL_ENV: production
|
|
|
|
- name: Upload artifact
|
|
uses: actions/upload-pages-artifact@v3
|
|
with:
|
|
path: docs/_site
|
|
|
|
deploy:
|
|
needs: build
|
|
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 |