Skip to content

Commit 030c239

Browse files
committed
index
1 parent 0a87d0b commit 030c239

215 files changed

Lines changed: 3236 additions & 1243 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.
Lines changed: 78 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,78 @@
1+
name: Publish API Documentation on Release
2+
3+
permissions:
4+
contents: read
5+
pages: write
6+
id-token: write
7+
8+
on:
9+
push:
10+
branches:
11+
- romanG/api-reference
12+
tags:
13+
- 'v*.*.*'
14+
workflow_dispatch:
15+
16+
concurrency:
17+
group: 'api-docs-release'
18+
cancel-in-progress: false
19+
20+
jobs:
21+
build-and-deploy:
22+
runs-on: ubuntu-latest
23+
environment:
24+
name: github-pages
25+
url: ${{ steps.deployment.outputs.page_url }}
26+
27+
steps:
28+
- name: Checkout code
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Setup Node.js
34+
uses: actions/setup-node@v4
35+
with:
36+
node-version: '18'
37+
cache: 'yarn'
38+
39+
- name: Setup Ruby
40+
uses: ruby/setup-ruby@v1
41+
with:
42+
ruby-version: '3.1'
43+
bundler-cache: true
44+
45+
- name: Install Node dependencies
46+
run: yarn install --frozen-lockfile
47+
48+
- name: Extract version from tag
49+
id: version
50+
run: |
51+
VERSION=${GITHUB_REF#refs/tags/v}
52+
echo "version=$VERSION" >> $GITHUB_OUTPUT
53+
echo "Publishing documentation for version $VERSION"
54+
55+
- name: Build types and generate API docs
56+
run: |
57+
echo "Building API documentation for version ${{ steps.version.outputs.version }}"
58+
yarn docs:api
59+
60+
- name: Add version info to documentation
61+
run: |
62+
sed -i "1i---\nlayout: default\ntitle: \"Datadog Browser SDK v${{ steps.version.outputs.version }}\"\nversion: \"${{ steps.version.outputs.version }}\"\n---\n" docs/index.md
63+
64+
- name: Setup Pages
65+
uses: actions/configure-pages@v4
66+
67+
- name: Build with Jekyll
68+
run: |
69+
bundle exec jekyll build --source docs --destination _site
70+
env:
71+
JEKYLL_ENV: production
72+
73+
- name: Upload artifact
74+
uses: actions/upload-pages-artifact@v3
75+
76+
- name: Deploy to GitHub Pages
77+
id: deployment
78+
uses: actions/deploy-pages@v4

.github/workflows/pages.yml

Whitespace-only changes.

Gemfile

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,14 @@
1+
source "https://rubygems.org"
2+
3+
gem "github-pages", group: :jekyll_plugins
4+
5+
group :jekyll_plugins do
6+
gem "jekyll-feed"
7+
gem "jekyll-sitemap"
8+
gem "jekyll-seo-tag"
9+
gem "jekyll-relative-links"
10+
gem "jekyll-remote-theme"
11+
gem "jekyll-include-cache"
12+
end
13+
14+
gem "webrick", "~> 1.7"

0 commit comments

Comments
 (0)