diff --git a/.github/workflows/deploy_gh_pages.yml b/.github/workflows/deploy_gh_pages.yml new file mode 100644 index 00000000..c5b9b7c2 --- /dev/null +++ b/.github/workflows/deploy_gh_pages.yml @@ -0,0 +1,43 @@ +name: Deploy Docs (GitHub Pages) + +on: + push: + branches: + - master + workflow_dispatch: + +permissions: + contents: read + pages: write + id-token: write + +concurrency: + group: "pages" + cancel-in-progress: true + +jobs: + build: + runs-on: ubuntu-latest + env: + PR_PATH: pull/${{github.event.number}} + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + with: + node-version: 20 + - run: npm ci + # 👇 ensure the correct base path in the built site + - run: DOCUSAURUS_BASE_URL=/docs/ npm run build + - uses: actions/upload-pages-artifact@v3 + with: + path: build + + deploy: + runs-on: ubuntu-latest + needs: build + environment: + name: github-pages + url: ${{ steps.deployment.outputs.page_url }} + steps: + - id: deployment + uses: actions/deploy-pages@v4 diff --git a/docusaurus.config.js b/docusaurus.config.js index 41836b3f..0a8f9849 100644 --- a/docusaurus.config.js +++ b/docusaurus.config.js @@ -58,8 +58,8 @@ const config = { ], title: 'The Scribe Documentation Site', - tagline: 'Four legs good. Two legs bad.', - url: 'https://profound-wisp-8a86b9.netlify.app/', + tagline: 'Evidence-driven supply chain security.', + // url: 'https://profound-wisp-8a86b9.netlify.app/', baseUrl: process.env.DOCUSAURUS_BASE_URL || '/', //onBrokenLinks: 'throw', onBrokenLinks: 'warn', onBrokenMarkdownLinks: 'warn', @@ -67,8 +67,10 @@ 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. + url: 'https://scribe-security.github.io/', + organizationName: 'scribe-security', // Usually your GitHub org/user name. + projectName: 'docs', // Usually your repo name. + deploymentBranch: 'gh-pages', // Even if you don't use internalization, you can use this field to set useful // metadata like html lang. For example, if your site is Chinese, you may want // to replace "en" with "zh-Hans". @@ -88,7 +90,7 @@ const config = { // --- FIX: allow forcing prod list via env; otherwise keep your original logic --- !FORCE_PROD && ( (isPullRequest && branch.includes("dev-preview") || - (!isPullRequest && branch == "dev")) + (!isPullRequest && branch === "dev")) ) ) ? [ '**/*.md',