Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
name: Deploy to GitHub Pages

on:
push:
branches: [main]
workflow_dispatch:

permissions:
contents: read
pages: write
id-token: write

concurrency:
group: pages
cancel-in-progress: false

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm

- name: Install dependencies
run: npm ci
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Build site
run: npm run build
env:
ZENDESK_KEY: ${{ secrets.ZENDESK_KEY }}
AMPLITUDE_API_KEY: ${{ secrets.AMPLITUDE_API_KEY }}
GTM_ID: ${{ vars.GTM_ID }}
FEATURE_DEV_FLAG: ${{ vars.FEATURE_DEV_FLAG }}
FEATURE_NEW_PRODUCTS_FLAG: ${{ vars.FEATURE_NEW_PRODUCTS_FLAG }}

- uses: actions/configure-pages@v6

- uses: actions/upload-pages-artifact@v5
with:
path: build

deploy:
needs: build
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- id: deployment
uses: actions/deploy-pages@v5
30 changes: 30 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: PR build

on:
pull_request:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7

- uses: actions/setup-node@v6
with:
node-version: 24
cache: npm

# The ADO registry in .npmrc requires auth even to install, so PR
# builds need NPM_TOKEN too (fork PRs don't get secrets and will fail)
- name: Install dependencies
run: npm ci
env:
NPM_TOKEN: ${{ secrets.NPM_TOKEN }}

- name: Build site
run: npm run build
env:
# plugin-google-gtag requires a trackingID, so PR builds need it too
GTM_ID: ${{ vars.GTM_ID }}
FEATURE_DEV_FLAG: ${{ vars.FEATURE_DEV_FLAG }}
FEATURE_NEW_PRODUCTS_FLAG: ${{ vars.FEATURE_NEW_PRODUCTS_FLAG }}
2 changes: 0 additions & 2 deletions docusaurus.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -262,8 +262,6 @@ const config = {
anonymizeIP: true,
},
],

"vercel-analytics",
],

themes: ["@docusaurus/theme-mermaid", "docusaurus-theme-search-typesense"],
Expand Down
61 changes: 0 additions & 61 deletions package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

1 change: 0 additions & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,6 @@
"@codat/sdk-link-types": "1.10.1",
"@docusaurus/core": "3.9.2",
"@docusaurus/plugin-client-redirects": "3.9.2",
"@docusaurus/plugin-vercel-analytics": "3.9.2",
"@docusaurus/preset-classic": "3.9.2",
"@docusaurus/theme-live-codeblock": "3.9.2",
"@docusaurus/theme-mermaid": "3.9.2",
Expand Down
2 changes: 0 additions & 2 deletions src/theme/NavbarItem/index.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import NavbarIconLink from "@theme/NavbarItem/NavbarIconLink";
import NavbarSeparator from "@theme/NavbarItem/NavbarSeparator";
import NavbarCta from "@theme/NavbarItem/NavbarCta";

import { track } from "@vercel/analytics";
import { trackEvent } from "../../utils/amplitude";

const CustomNavbarItemComponents = {
Expand All @@ -18,7 +17,6 @@ export default function NavbarItem(props) {

const onTrack = () => {
if (props.label === "Sign in") {
track("Sign in");
trackEvent("Navigation Click", {
element: "Sign in",
type: "navbar_cta",
Expand Down
1 change: 1 addition & 0 deletions static/CNAME
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
docs.codat.io