From b12eb87b384f9027146d35bcbc9262348eaced83 Mon Sep 17 00:00:00 2001 From: nxglabs Date: Mon, 18 Dec 2023 20:34:20 +0530 Subject: [PATCH] chore: setup github pages action to publish docs --- .github/workflows/deployghpages.yml | 43 +++++++++++++++++++++++++++++ docs/docusaurus.config.js | 4 +-- 2 files changed, 45 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/deployghpages.yml diff --git a/.github/workflows/deployghpages.yml b/.github/workflows/deployghpages.yml new file mode 100644 index 000000000..717c06b32 --- /dev/null +++ b/.github/workflows/deployghpages.yml @@ -0,0 +1,43 @@ +name: Deploy to GitHub Pages + +on: + push: + branches: + - feat-docs + # 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 + +permissions: + contents: write + +jobs: + 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: yarn + + - name: Install dependencies + run: yarn install --frozen-lockfile + - name: Build website + run: yarn build + + # Popular action to deploy to GitHub Pages: + # Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus + - name: Deploy to GitHub Pages + uses: peaceiris/actions-gh-pages@v3 + with: + github_token: ${{ secrets.GITHUB_TOKEN }} + # Build output to publish to the `gh-pages` branch: + publish_dir: ./build + # The following lines assign commit authorship to the official + # GH-Actions bot for deploys to `gh-pages` branch: + # https://github.com/actions/checkout/issues/13#issuecomment-724415212 + # The GH actions bot is used by default if you didn't specify the two fields. + # You can swap them out with your own user credentials. + user_name: github-actions[bot] + user_email: 41898282+github-actions[bot]@users.noreply.github.com \ No newline at end of file diff --git a/docs/docusaurus.config.js b/docs/docusaurus.config.js index f521a4ace..ed51e74c2 100644 --- a/docs/docusaurus.config.js +++ b/docs/docusaurus.config.js @@ -20,8 +20,8 @@ const config = { // 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: 'opensignlabs', // Usually your GitHub org/user name. + projectName: 'opensign', // Usually your repo name. onBrokenLinks: 'throw', onBrokenMarkdownLinks: 'warn',