Skip to content

Commit

Permalink
Merge branch 'docs-v-1.0.0' of https://github.com/Mindinventory/react…
Browse files Browse the repository at this point in the history
…-native-boilerplate into documentation
  • Loading branch information
ankitpmi committed Jun 18, 2024
2 parents a3e4e51 + 93102fd commit 8e8248a
Show file tree
Hide file tree
Showing 2 changed files with 63 additions and 5 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: Deploy to GitHub Pages

on:
push:
branches:
- docs-deployment
# Review gh actions docs if you want to further define triggers, paths, etc
# https://docs.github.com/en/actions/using-workflows/workflow-syntax-for-github-actions#on

jobs:
build:
name: Build documentation
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: actions/setup-node@v4
with:
node-version: 18

- name: Install dependencies
run: npm install
working-directory: ./documentation

- name: Clear old build
run: npm run clear
working-directory: ./documentation

- name: Build website
run: npm run build
working-directory: ./documentation

- name: Upload Build Artifact
uses: actions/upload-pages-artifact@v3
with:
path: documentation/build

deploy:
name: Deploy to GitHub Pages
needs: build

# Grant GITHUB_TOKEN the permissions required to make a Pages deployment
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source

# Deploy to the github-pages environment
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
11 changes: 6 additions & 5 deletions documentation/docusaurus.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,18 +10,19 @@ const config: Config = {
favicon: 'img/favicon.ico',

// Set the production url of your site here
url: 'https://your-docusaurus-site.example.com',
url: 'https://mindinventory.github.io',
// Set the /<baseUrl>/ pathname under which your site is served
// For GitHub pages deployment, it is often '/<projectName>/'
baseUrl: '/',
baseUrl: '/react-native-boilerplate/',

// GitHub pages deployment config.
// If you aren't using GitHub pages, you don't need these.
organizationName: 'facebook', // Usually your GitHub org/user name.
projectName: 'docusaurus', // Usually your repo name.
organizationName: 'Mindinventory', // Usually your GitHub org/user name.
projectName: 'react-native-boilerplate', // Usually your repo name.

onBrokenLinks: 'throw',
onBrokenMarkdownLinks: 'warn',
deploymentBranch:'docs-deployment',

// Even if you don't use internationalization, you can use this field to set
// useful metadata like html lang. For example, if your site is Chinese, you
Expand Down Expand Up @@ -136,7 +137,7 @@ const config: Config = {
}
} satisfies Preset.ThemeConfig,

trailingSlash: false
trailingSlash: true,
};

export default config;

0 comments on commit 8e8248a

Please sign in to comment.