Skip to content

Commit 98b1ac9

Browse files
committed
index
1 parent 0a87d0b commit 98b1ac9

File tree

213 files changed

+3209
-1243
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

213 files changed

+3209
-1243
lines changed
Lines changed: 85 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,85 @@
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+
tags:
11+
- 'v*.*.*'
12+
workflow_dispatch:
13+
14+
concurrency:
15+
group: 'api-docs-release'
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build-and-deploy:
20+
runs-on: ubuntu-latest
21+
environment:
22+
name: github-pages
23+
url: ${{ steps.deployment.outputs.page_url }}
24+
25+
steps:
26+
- name: Checkout code
27+
uses: actions/checkout@v4
28+
with:
29+
fetch-depth: 0
30+
31+
- name: Setup Node.js
32+
uses: actions/setup-node@v4
33+
with:
34+
node-version: '18'
35+
cache: 'yarn'
36+
37+
- name: Setup Ruby
38+
uses: ruby/setup-ruby@v1
39+
with:
40+
ruby-version: '3.1'
41+
bundler-cache: true
42+
43+
- name: Install Node dependencies
44+
run: yarn install --frozen-lockfile
45+
46+
- name: Extract version from tag
47+
id: version
48+
run: |
49+
VERSION=${GITHUB_REF#refs/tags/v}
50+
echo "version=$VERSION" >> $GITHUB_OUTPUT
51+
echo "Publishing documentation for version $VERSION"
52+
53+
- name: Build types and generate API docs
54+
run: |
55+
echo "Building API documentation for version ${{ steps.version.outputs.version }}"
56+
yarn docs:api
57+
58+
- name: Add version info to documentation
59+
run: |
60+
sed -i "1i---\nlayout: default\ntitle: \"Datadog Browser SDK v${{ steps.version.outputs.version }}\"\nversion: \"${{ steps.version.outputs.version }}\"\n---\n" docs/index.md
61+
62+
- name: Setup Pages
63+
uses: actions/configure-pages@v4
64+
65+
- name: Build with Jekyll
66+
run: |
67+
bundle exec jekyll build --source docs --destination _site
68+
env:
69+
JEKYLL_ENV: production
70+
71+
- name: Upload artifact
72+
uses: actions/upload-pages-artifact@v3
73+
74+
- name: Deploy to GitHub Pages
75+
id: deployment
76+
uses: actions/deploy-pages@v4
77+
78+
- name: Create deployment summary
79+
run: |
80+
echo "## 📚 API Documentation Published" >> $GITHUB_STEP_SUMMARY
81+
echo "" >> $GITHUB_STEP_SUMMARY
82+
echo "**Version:** ${{ steps.version.outputs.version }}" >> $GITHUB_STEP_SUMMARY
83+
echo "**URL:** ${{ steps.deployment.outputs.page_url }}" >> $GITHUB_STEP_SUMMARY
84+
echo "**Tag:** ${{ github.ref_name }}" >> $GITHUB_STEP_SUMMARY
85+
echo "" >> $GITHUB_STEP_SUMMARY

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)