Skip to content

Commit

Permalink
Feature/19 feature add documentation using docusaurus and GitHub pages (
Browse files Browse the repository at this point in the history
#321)

* Create deploy-docs.yml

* Create package.json

* Create index.js

* Create docusaurus.config.js

* Update infisical-secrets-check.yml
  • Loading branch information
guibranco authored Oct 17, 2024
1 parent be70ed8 commit 4586842
Show file tree
Hide file tree
Showing 5 changed files with 98 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Deploy Documentation

on:
push:
branches:
- main

jobs:
deploy:
runs-on: ubuntu-latest

steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: '16'

- name: Install dependencies and build
run: |
cd docs
npm install
npm run build
- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: docs/build
publish_branch: gh-pages
2 changes: 1 addition & 1 deletion .github/workflows/infisical-secrets-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,4 +23,4 @@ jobs:
fetch-depth: 0

- name: Infisical secrets check
uses: guibranco/[email protected].10
uses: guibranco/[email protected].12
23 changes: 23 additions & 0 deletions docs/docusaurus.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
module.exports = {
title: 'VTEX SDK',
tagline: 'Documentation for VTEX SDK',
url: 'https://guibranco.github.io',
baseUrl: '/VTEX-SDK-dotnet/',
onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
favicon: 'img/favicon.ico',
organizationName: 'guibranco',
projectName: 'VTEX-SDK-dotnet',
themeConfig: {
navbar: {
title: 'VTEX SDK',
logo: {
alt: 'VTEX Logo',
src: 'img/logo.svg',
},
items: [
{to: 'docs/', label: 'Docs', position: 'left'},
],
},
},
};
25 changes: 25 additions & 0 deletions docs/package.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
"name": "vtex-sdk-docs",
"version": "0.0.1",
"private": true,
"scripts": {
"start": "docusaurus start",
"build": "docusaurus build",
"serve": "docusaurus serve"
},
"dependencies": {
"@docusaurus/core": "^2.0.0",
"@docusaurus/preset-classic": "^2.0.0"
},
"browserslist": {
"production": [
">0.2%",
"not dead",
"not op_mini all"
],
"development": [
"last 1 chrome version",
"last 1 firefox version",
"last 1 safari version"
]
}
}
18 changes: 18 additions & 0 deletions docs/src/pages/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@

import React from 'react';
import Layout from '@theme/Layout';

function Home() {
return (
<Layout
title="VTEX SDK Documentation"
description="Comprehensive documentation for VTEX SDK">
<main>
<h1>Welcome to VTEX SDK Documentation</h1>
<p>Explore the documentation to understand how to use the VTEX SDK effectively.</p>
</main>
</Layout>
);
}

export default Home;

0 comments on commit 4586842

Please sign in to comment.