From 5c09f02db1fd8c404f4ac8019d869b10f38d440b Mon Sep 17 00:00:00 2001 From: cupOJoseph <9449596+cupOJoseph@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:39:04 -0500 Subject: [PATCH 1/2] ci: auto-deploy to GitHub Pages on push to main - Replace manual workflow_dispatch with push-to-main trigger - Use GitHub Pages actions (upload-pages-artifact + deploy-pages) - Fix site URL to docs.nerite.org (custom domain) - Keep workflow_dispatch for manual deploys --- .github/workflows/deploy.yml | 60 +++++++++++++++++++++--------------- docusaurus.config.js | 2 +- 2 files changed, 37 insertions(+), 25 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index be3970e..adf1078 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -1,39 +1,51 @@ -name: Deploy +name: Deploy to GitHub Pages on: + push: + branches: + - main workflow_dispatch: - inputs: - environment: - description: 'Environment to deploy to' - required: true - default: 'production' - type: choice - options: - - production - - staging - version: - description: 'Version to deploy' - required: false - type: string + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: false jobs: - deploy: + build: runs-on: ubuntu-latest - steps: - - name: Checkout code + - name: Checkout uses: actions/checkout@v4 - name: Setup Node.js uses: actions/setup-node@v4 with: - node-version: '20' - cache: 'yarn' + node-version: "20" + cache: yarn - name: Install dependencies - run: npx yarn install + run: yarn install --frozen-lockfile - - name: Build and Deploy - run: | - npx yarn build - GIT_USER=cupOJoseph npx yarn deploy \ No newline at end of file + - name: Build + run: yarn build + + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + with: + path: build + + deploy: + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + runs-on: ubuntu-latest + needs: build + steps: + - name: Deploy to GitHub Pages + id: deployment + uses: actions/deploy-pages@v4 diff --git a/docusaurus.config.js b/docusaurus.config.js index 9abf559..2f4a601 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -15,7 +15,7 @@ const config = { favicon: "img/favicon.ico", // Set the production url of your site here - url: "https://neriteorg.github.io", + url: "https://docs.nerite.org", // Set the // pathname under which your site is served baseUrl: "/", From ffe5931560cdee0e906998a2c32a6faf7c052231 Mon Sep 17 00:00:00 2001 From: cupOJoseph <9449596+cupOJoseph@users.noreply.github.com> Date: Thu, 26 Feb 2026 16:50:46 -0500 Subject: [PATCH 2/2] ci: deploy to gh-pages branch on push to main --- .github/workflows/deploy.yml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index adf1078..45f81a2 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -7,16 +7,10 @@ on: workflow_dispatch: permissions: - contents: read - pages: write - id-token: write - -concurrency: - group: "pages" - cancel-in-progress: false + contents: write jobs: - build: + deploy: runs-on: ubuntu-latest steps: - name: Checkout @@ -34,18 +28,9 @@ jobs: - name: Build run: yarn build - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 + - name: Deploy to gh-pages branch + uses: peaceiris/actions-gh-pages@v4 with: - path: build - - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - needs: build - steps: - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 + github_token: ${{ secrets.GITHUB_TOKEN }} + publish_dir: ./build + cname: docs.nerite.org