Skip to content
Draft
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
24 changes: 8 additions & 16 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,9 +7,7 @@ on:
workflow_dispatch:

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

concurrency:
group: pages
Expand All @@ -20,23 +18,17 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/configure-pages@v6.0.0
- uses: actions/setup-node@v6.3.0
with:
node-version-file: .nvmrc
- uses: oven-sh/setup-bun@v2.2.0
- run: bun install --frozen-lockfile
- run: bun run build
- uses: actions/upload-pages-artifact@v4.0.0
env:
BASE_PATH: ${{ vars.BASE_PATH }}
- uses: JamesIves/github-pages-deploy-action@v4
with:
path: ./dist

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.0.5
folder: dist
clean: true
clean-exclude: |
pr-preview/
31 changes: 31 additions & 0 deletions .github/workflows/preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Preview

on:
pull_request:
types: [opened, synchronize, reopened, closed]

permissions:
contents: write
pull-requests: write

concurrency:
group: preview-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
preview:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6.3.0
with:
node-version-file: .nvmrc
- uses: oven-sh/setup-bun@v2.2.0
- run: bun install --frozen-lockfile
- if: github.event.action != 'closed'
run: bun run build
env:
BASE_PATH: ${{ vars.BASE_PATH }}/pr-preview/pr-${{ github.event.pull_request.number }}/
- uses: rossjrw/pr-preview-action@v1
with:
source-dir: dist
2 changes: 2 additions & 0 deletions astro.config.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,14 @@ import starlight from "@astrojs/starlight";
import starlightLlmsTxt from "starlight-llms-txt";

const site = "https://agentic-engineering.swmansion.com/";
const base = process.env.BASE_PATH || "/";
Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure setting default to "/" won't break Astro in some weird way. Wouldn't it be safer to default to undefined or null?

const repo = `https://github.com/software-mansion/agentic-engineering/`;
const defaultOgImage = `${site}og-default.png`;

// https://astro.build/config
export default defineConfig({
site,
base,
integrations: [
starlight({
title: "Software Mansion Agentic Engineering Guide",
Expand Down
Empty file added public/.nojekyll
Empty file.
Loading