Skip to content

Commit

Permalink
chore: add documentation CI (#381)
Browse files Browse the repository at this point in the history
* chore: add documentation CI

* chore: fix documentation lock file

* fix: fix ci steps
  • Loading branch information
korvin89 authored Jan 15, 2024
1 parent d0ec520 commit 2b9828a
Show file tree
Hide file tree
Showing 6 changed files with 651 additions and 257 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/docs-deploy-test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
name: Test documentation deployment

on:
pull_request:
branches: [main]

jobs:
test-docs-deploy:
name: Test documentation deployment
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install tsconfig
run: npm i @gravity-ui/tsconfig
- name: Install dependencies
run: npm run docs:deps
- name: Build
run: npm run docs:build
29 changes: 29 additions & 0 deletions .github/workflows/docs-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: Deploy to GitHub Pages

on:
push:
branches: [main]

jobs:
docs-deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm
- name: Install tsconfig
run: npm i @gravity-ui/tsconfig
- name: Install dependencies
run: npm run docs:deps
- name: Build
run: npm run docs:build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
user_name: 'github-actions[bot]'
user_email: 'github-actions[bot]@users.noreply.github.com'
1 change: 1 addition & 0 deletions documentation/.npmrc
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
registry=https://registry.npmjs.org
7 changes: 4 additions & 3 deletions documentation/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -35,14 +35,15 @@ const config: Config = {
title: 'ChartKit',
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://github.com',
url: 'https://gravity-ui.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
baseUrl: '/chartkit/',
deploymentBranch: 'gh-pages',

organizationName: 'gravity-ui',
projectName: 'chartkit',
trailingSlash: false,

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
Expand Down
Loading

0 comments on commit 2b9828a

Please sign in to comment.