diff --git a/.github/workflows/deploy-docs.yml b/.github/workflows/deploy-docs.yml new file mode 100644 index 000000000..278ba9862 --- /dev/null +++ b/.github/workflows/deploy-docs.yml @@ -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 diff --git a/.github/workflows/infisical-secrets-check.yml b/.github/workflows/infisical-secrets-check.yml index dd7a9ae18..e9f9c0acb 100644 --- a/.github/workflows/infisical-secrets-check.yml +++ b/.github/workflows/infisical-secrets-check.yml @@ -23,4 +23,4 @@ jobs: fetch-depth: 0 - name: Infisical secrets check - uses: guibranco/github-infisical-secrets-check-action@v1.1.10 + uses: guibranco/github-infisical-secrets-check-action@v1.1.12 diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js new file mode 100644 index 000000000..2e3d49867 --- /dev/null +++ b/docs/docusaurus.config.js @@ -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'}, + ], + }, + }, +}; diff --git a/docs/package.json b/docs/package.json new file mode 100644 index 000000000..3ea15d555 --- /dev/null +++ b/docs/package.json @@ -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" + ] + } +} diff --git a/docs/src/pages/index.js b/docs/src/pages/index.js new file mode 100644 index 000000000..012f862fa --- /dev/null +++ b/docs/src/pages/index.js @@ -0,0 +1,18 @@ + +import React from 'react'; +import Layout from '@theme/Layout'; + +function Home() { + return ( + +
+

Welcome to VTEX SDK Documentation

+

Explore the documentation to understand how to use the VTEX SDK effectively.

+
+
+ ); +} + +export default Home;