Github Pages
In order to deploy the docusaurus reposiroty onto a Github Pages that is accessible by anyone on the internet, you will need to perform the following steps in order.
- Turn on Github Pages in setting
![2023.06.08 - 13_56_37 - [Google Chrome-Pages] -](/Documentation-Orion/assets/images/2023.06.08 - 13_56_37 - [Google Chrome-Pages] --9ee70c8847e50051d65d5f9773aac715.jpg)
Changing the field
urlandbaseUrlfollowing indocusaurus.config.js![2023.06.08 - 13_59_03 - [Code-█ ฅ^•ﻌ•^ฅ █ █ がんばれ! █] -](/Documentation-Orion/assets/images/3213213-38c3a619983d8d443cd0db068bc97b2a.jpg)
Adding Github Workflow / Action
name:
Deploy to Github Pages
on:
push:
branches: ["main", "gh-pages"]
permissions:
contents: read
pages: write
id-token: write
jobs:
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
# 👇 Build steps
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: 18.x
cache: npm
- name: Install dependencies
run: npm clean-install
- name: Build
run: npm run build
# 👆 Build steps
- name: Setup Pages
uses: actions/configure-pages@v1
- name: Upload artifact
uses: actions/upload-pages-artifact@v1
with:
# 👇 Specify build output path
path: build
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v1Trigger the GitHub Action we just created
![2023.06.08 - 14_01_08 - [Google Chrome-Actions · SuoweiHuOPC-Orion-Documentation] -](/Documentation-Orion/assets/images/2023.06.08 - 14_01_08 - [Google Chrome-Actions · SuoweiHuOPC-Orion-Documentation] --815a675899d07e59d49a0746eb739630.jpg)
Wait for the above compilation finish, and then you could proceed to https://<organisation_name>.github.io/<project_name> to see your document live !