Skip to content

Commit 70720ac

Browse files
committed
Add Jekyll configuration and deployment workflow for GitHub Pages
1 parent 4f58cd7 commit 70720ac

File tree

3 files changed

+117
-0
lines changed

3 files changed

+117
-0
lines changed

.github/workflows/pages.yml

Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: Deploy Jekyll site to Pages
2+
3+
on:
4+
push:
5+
branches: ['romanG/api-reference']
6+
pull_request:
7+
branches: ['romanG/api-reference']
8+
workflow_dispatch:
9+
10+
permissions:
11+
contents: read
12+
pages: write
13+
id-token: write
14+
15+
concurrency:
16+
group: 'pages'
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: Checkout
24+
uses: actions/checkout@v4
25+
26+
- name: Setup Ruby
27+
uses: ruby/setup-ruby@v1
28+
with:
29+
ruby-version: '3.2'
30+
bundler-cache: true
31+
working-directory: ./docs
32+
33+
- name: Setup Pages
34+
id: pages
35+
uses: actions/configure-pages@v4
36+
37+
- name: Install dependencies
38+
run: |
39+
cd docs
40+
gem install bundler jekyll
41+
bundle init --force
42+
bundle add jekyll minima
43+
bundle install
44+
45+
- name: Build with Jekyll
46+
run: |
47+
cd docs
48+
bundle exec jekyll build --baseurl "${{ steps.pages.outputs.base_path }}"
49+
env:
50+
JEKYLL_ENV: production
51+
52+
- name: Upload artifact
53+
uses: actions/upload-pages-artifact@v3
54+
with:
55+
path: ./docs/_site
56+
57+
deploy:
58+
environment:
59+
name: github-pages
60+
url: ${{ steps.deployment.outputs.page_url }}
61+
runs-on: ubuntu-latest
62+
needs: build
63+
if: github.ref == 'refs/heads/romanG/api-reference'
64+
steps:
65+
- name: Deploy to GitHub Pages
66+
id: deployment
67+
uses: actions/deploy-pages@v4

docs/Gemfile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
source "https://rubygems.org"
2+
3+
gem "jekyll", "~> 4.3"
4+
gem "minima", "~> 2.5"
5+
6+
group :jekyll_plugins do
7+
gem "jekyll-feed", "~> 0.12"
8+
gem "jekyll-relative-links"
9+
end
10+
11+
platforms :mingw, :x64_mingw, :mswin, :jruby do
12+
gem "tzinfo", ">= 1", "< 3"
13+
gem "tzinfo-data"
14+
end
15+
16+
gem "wdm", "~> 0.1.1", :platforms => [:mingw, :x64_mingw, :mswin]

docs/_config.yml

Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
title: 'Datadog Browser SDK API Reference'
2+
description: 'API documentation for Datadog Browser SDK packages'
3+
4+
markdown: kramdown
5+
highlighter: rouge
6+
theme: minima
7+
8+
baseurl: '/browser-sdk'
9+
url: 'https://datadoghq.dev'
10+
11+
plugins:
12+
- jekyll-relative-links
13+
14+
relative_links:
15+
enabled: true
16+
collections: false
17+
18+
include:
19+
- '*.md'
20+
21+
exclude:
22+
- README.md
23+
- LICENSE
24+
- CHANGELOG.md
25+
- node_modules/
26+
- package.json
27+
- yarn.lock
28+
29+
kramdown:
30+
input: GFM
31+
syntax_highlighter: rouge
32+
syntax_highlighter_opts:
33+
block:
34+
line_numbers: false

0 commit comments

Comments
 (0)