Skip to content

Commit

Permalink
Merge branch 'production' into ranbel/warp-mtu
Browse files Browse the repository at this point in the history
merge in docs site functionality
  • Loading branch information
ranbel committed Oct 21, 2024
2 parents f779d61 + 527f0bb commit 0514f1a
Show file tree
Hide file tree
Showing 213 changed files with 9,517 additions and 6,038 deletions.
12 changes: 6 additions & 6 deletions .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
Expand Up @@ -18,13 +18,13 @@

# AI

/src/content/docs/ai-gateway/ @kathayl @G4brym @mchenco @pdwittig @daisyfaithauma @cloudflare/pcx-technical-writing
/src/content/docs/workers-ai/ @rita3ko @pdwittig @craigsdennis @markdembo @mchenco @daisyfaithauma @cloudflare/pcx-technical-writing
/src/content/docs/ai-gateway/ @kathayl @G4brym @mchenco @daisyfaithauma @cloudflare/pcx-technical-writing
/src/content/docs/workers-ai/ @rita3ko @craigsdennis @markdembo @mchenco @daisyfaithauma @cloudflare/pcx-technical-writing
/src/content/docs/workers-ai/static @mchenco @craigsdennis @cloudflare/pcx-technical-writing
/src/content/docs/vectorize/ @elithrar @vy-ton @pdwittig @sejoker @cloudflare/pcx-technical-writing
/src/content/changelogs/workers-ai.yaml @kathayl @G4brym @mchenco @pdwittig @daisyfaithauma @cloudflare/pcx-technical-writing
/src/content/changelogs/ai-gateway.yaml @kathayl @G4brym @mchenco @pdwittig @daisyfaithauma @cloudflare/pcx-technical-writing
/src/content/changelogs/vectorize.yaml @elithrar @pdwittig @sejoker @cloudflare/pcx-technical-writing
/src/content/docs/vectorize/ @elithrar @vy-ton @sejoker @cloudflare/pcx-technical-writing
/src/content/changelogs/workers-ai.yaml @kathayl @G4brym @mchenco @daisyfaithauma @cloudflare/pcx-technical-writing
/src/content/changelogs/ai-gateway.yaml @kathayl @G4brym @mchenco @daisyfaithauma @cloudflare/pcx-technical-writing
/src/content/changelogs/vectorize.yaml @elithrar @sejoker @cloudflare/pcx-technical-writing

# Analytics & Logs

Expand Down
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:
- package-ecosystem: "npm"
directory: "/"
versioning-strategy: "increase"
commit-message:
prefix: "[Docs Site] "
schedule:
interval: "daily"
assignees:
- "KianNH"
reviewers:
- "KianNH"
2 changes: 1 addition & 1 deletion .github/workflows/anchor-link-audit.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ jobs:
- run: npm ci

- run: npx astro build
- run: npm run build
env:
NODE_OPTIONS: "--max-old-space-size=4192"

Expand Down
26 changes: 14 additions & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,19 +20,12 @@ jobs:
- uses: actions/setup-node@v4
with:
node-version: 22

- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}

- uses: actions/cache@v4
id: npm-cache
cache: "npm"
- uses: actions/cache/restore@v4
with:
path: ${{ steps.npm-cache-dir.outputs.dir }}
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
path: |
node_modules/.astro
key: static

- run: npm ci
- run: npm run check
Expand All @@ -44,5 +37,14 @@ jobs:
NODE_OPTIONS: "--max-old-space-size=4192"
RUN_LINK_CHECK: true

- uses: actions/cache/save@v4
with:
path: |
node_modules/.astro
key: static

- name: Check - Validate redirects (infinite loops, sources with fragment)
run: npx tsm bin/validate-redirects.ts

- name: Tests
run: npm run test
15 changes: 7 additions & 8 deletions .github/workflows/publish-preview.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
runs-on: ubuntu-22.04
permissions:
contents: read
name: Publish to Cloudflare Pages (Preview)
name: Publish Preview
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -23,25 +23,24 @@ jobs:
- uses: actions/cache/restore@v4
with:
path: |
node_modules/.astro/_astro
node_modules/.astro/assets
node_modules/.astro
key: static
- run: npx astro build
- run: npm run build
name: Build
env:
NODE_OPTIONS: --max-old-space-size=4096
- run: npx wrangler pages deploy --project-name cloudflare-docs dist
name: Deploy to Cloudflare Pages
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- run: npm run build:worker && npx wrangler versions upload -c ./wrangler-workers.toml
name: Deploy to Cloudflare Workers [preview]
- run: npx wrangler versions upload -c ./wrangler-workers.toml
name: Deploy to Cloudflare Workers
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- uses: actions/cache/save@v4
if: always()
with:
path: |
node_modules/.astro/_astro
node_modules/.astro/assets
node_modules/.astro
key: static
15 changes: 9 additions & 6 deletions .github/workflows/publish-production.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ jobs:
runs-on: ubuntu-22.04
permissions:
contents: read
name: Publish to Cloudflare Pages (Production)
name: Publish Production
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
Expand All @@ -19,21 +19,24 @@ jobs:
- uses: actions/cache/restore@v4
with:
path: |
node_modules/.astro/_astro
node_modules/.astro/assets
node_modules/.astro
key: static
- run: npx astro build
- run: npm run build
name: Build
env:
NODE_OPTIONS: --max-old-space-size=4096
- run: npx wrangler pages deploy --project-name cloudflare-docs dist
name: Deploy to Cloudflare Pages
env:
CLOUDFLARE_ACCOUNT_ID: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- run: npx wrangler deploy -c ./wrangler-workers.toml
name: Deploy to Cloudflare Workers
env:
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }}
- uses: actions/cache/save@v4
if: always()
with:
path: |
node_modules/.astro/_astro
node_modules/.astro/assets
node_modules/.astro
key: static
6 changes: 3 additions & 3 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ import tailwind from "@astrojs/tailwind";
import starlightDocSearch from "@astrojs/starlight-docsearch";
import starlightImageZoom from "starlight-image-zoom";
import liveCode from "astro-live-code";
import rehypeSlug from "rehype-slug";
import rehypeMermaid from "rehype-mermaid";
import rehypeAutolinkHeadings, {
type Options as rehypeAutolinkHeadingsOptions,
Expand All @@ -17,6 +16,7 @@ import icon from "astro-icon";
import sitemap from "@astrojs/sitemap";
import react from "@astrojs/react";
import rehypeTitleFigure from "rehype-title-figure";
import rehypeHeadingSlugs from "./plugins/rehype/heading-slugs";

const runLinkCheck = process.env.RUN_LINK_CHECK || false;

Expand Down Expand Up @@ -95,7 +95,7 @@ export default defineConfig({
rel: ["noopener"],
},
],
rehypeSlug,
rehypeHeadingSlugs,
[rehypeAutolinkHeadings, autolinkConfig],
// @ts-expect-error TODO: fix types
rehypeTitleFigure,
Expand Down Expand Up @@ -155,7 +155,6 @@ export default defineConfig({
MarkdownContent: "./src/components/overrides/MarkdownContent.astro",
Sidebar: "./src/components/overrides/Sidebar.astro",
PageSidebar: "./src/components/overrides/PageSidebar.astro",
SiteTitle: "./src/components/overrides/SiteTitle.astro",
PageTitle: "./src/components/overrides/PageTitle.astro",
SocialIcons: "./src/components/overrides/SocialIcons.astro",
SkipLink: "./src/components/overrides/SkipLink.astro",
Expand All @@ -170,6 +169,7 @@ export default defineConfig({
"./src/mermaid.css",
"./src/table.css",
"./src/tailwind.css",
"./src/title.css",
"./src/tooltips.css",
],
pagination: false,
Expand Down
Loading

0 comments on commit 0514f1a

Please sign in to comment.