Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
71 changes: 71 additions & 0 deletions .github/workflows/api-docs-release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,71 @@
name: Publish API Documentation on Release

permissions:
contents: read
pages: write
id-token: write

on:
push:
branches:
- romanG/api-reference-github

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Note : For testing purpose, will be deleted before pr get merged.

tags:
- 'v*.*.*'
workflow_dispatch:

concurrency:
group: 'api-docs-release'
cancel-in-progress: false

jobs:
build-and-deploy:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: '18'
cache: 'yarn'

- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
bundler-cache: true

- name: Install Node dependencies
run: yarn install --frozen-lockfile

- name: Build TS declarations
run: yarn build

- name: Build types and generate API docs
run: |
echo "Building API documentation for version ${{ steps.version.outputs.version }}"
yarn docs:api

- name: Setup Pages
uses: actions/configure-pages@v4

- name: Build with Jekyll
run: |
bundle exec jekyll build --source docs --destination _site --config _config_docs.yml
env:
JEKYLL_ENV: production
PAGES_REPO_NWO: ${{ github.repository }}

- name: Upload artifact
uses: actions/upload-pages-artifact@v3

- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,5 @@ rum-events-format
developer-extension/dist
test/**/dist
yarn.lock
docs
etc
12 changes: 12 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,12 @@
source "https://rubygems.org"

gem "github-pages", group: :jekyll_plugins

group :jekyll_plugins do
gem "jekyll-sitemap"
gem "jekyll-seo-tag"
gem "jekyll-relative-links"
gem "jekyll-remote-theme"
end

gem "webrick", "~> 1.7"
Loading
Loading