Skip to content

Commit ac8e193

Browse files
committed
Add Jekyll docs workflow.
1 parent 95ee8fc commit ac8e193

File tree

2 files changed

+72
-1
lines changed

2 files changed

+72
-1
lines changed

.github/workflows/pages.yml

+69
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
# This workflow uses actions that are not certified by GitHub.
2+
# They are provided by a third-party and are governed by
3+
# separate terms of service, privacy policy, and support
4+
# documentation.
5+
6+
# Sample workflow for building and deploying a Jekyll site to GitHub Pages
7+
name: Deploy Jekyll site to Pages
8+
9+
on:
10+
push:
11+
branches: ["main"]
12+
paths:
13+
- "docs/**"
14+
15+
# Allows you to run this workflow manually from the Actions tab
16+
workflow_dispatch:
17+
18+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
19+
permissions:
20+
contents: read
21+
pages: write
22+
id-token: write
23+
24+
# Allow one concurrent deployment
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: true
28+
29+
jobs:
30+
# Build job
31+
build:
32+
runs-on: ubuntu-latest
33+
defaults:
34+
run:
35+
working-directory: docs
36+
steps:
37+
- name: Checkout
38+
uses: actions/checkout@v3
39+
- name: Setup Ruby
40+
uses: ruby/setup-ruby@v1
41+
with:
42+
ruby-version: '3.1' # Not needed with a .ruby-version file
43+
bundler-cache: true # runs 'bundle install' and caches installed gems automatically
44+
cache-version: 0 # Increment this number if you need to re-download cached gems
45+
working-directory: '${{ github.workspace }}/docs'
46+
- name: Setup Pages
47+
id: pages
48+
uses: actions/configure-pages@v3
49+
- name: Build with Jekyll
50+
# Outputs to the './_site' directory by default
51+
run: bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
52+
env:
53+
JEKYLL_ENV: production
54+
- name: Upload artifact
55+
# Automatically uploads an artifact from the './_site' directory by default
56+
uses: actions/upload-pages-artifact@v1
57+
with:
58+
path: "docs/_site/"
59+
# Deployment job
60+
deploy:
61+
environment:
62+
name: github-pages
63+
url: ${{ steps.deployment.outputs.page_url }}
64+
runs-on: ubuntu-latest
65+
needs: build
66+
steps:
67+
- name: Deploy to GitHub Pages
68+
id: deployment
69+
uses: actions/deploy-pages@v2

docs/Gemfile

+3-1
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,6 @@
1-
gem 'github-pages'
1+
source 'http://rubygems.org'
2+
3+
gem 'jekyll'
24
gem 'jekyll-default-layout'
35
gem 'jekyll-redirect-from'
46
gem 'just-the-docs'

0 commit comments

Comments
 (0)