Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
46 commits
Select commit Hold shift + click to select a range
7d44035
Start migrating to Kiln
0xTim Jul 6, 2026
5ac650a
Some tweaks
0xTim Jul 6, 2026
68da4ac
Use default kiln directory
0xTim Jul 6, 2026
c7c8436
Fix capitalisation
0xTim Jul 6, 2026
ffd695c
Styling for the homepage
0xTim Jul 6, 2026
e669ccc
Start using the groups
0xTim Jul 6, 2026
139e896
Add module switcher
0xTim Jul 6, 2026
6484032
Set up some actual repos to have more things
0xTim Jul 6, 2026
1e0fb78
Add RoutingKit and start working on versioned docs
0xTim Jul 6, 2026
d288c70
Better styling
0xTim Jul 6, 2026
0b261e0
Enable incremental builds
0xTim Jul 6, 2026
da0a405
Improve navbar speed
0xTim Jul 6, 2026
9147b70
Set up OG image
0xTim Jul 6, 2026
4b95370
Remove old images
0xTim Jul 6, 2026
ec2e941
Style the breadcrumbs
0xTim Jul 6, 2026
820682f
Better breadcrumbs
0xTim Jul 6, 2026
ad72908
Render code titles as code
0xTim Jul 6, 2026
448918c
Use a code font for code symbols
0xTim Jul 6, 2026
7100d5b
More monospacing
0xTim Jul 6, 2026
0f31ec5
Pull in the shared design
0xTim Jul 7, 2026
803cb26
Update required stylesheets
0xTim Jul 7, 2026
9654a79
Start building DocC
0xTim Jul 7, 2026
e3cc640
Migrate to argument parser
0xTim Jul 7, 2026
9901d66
Tidy up
0xTim Jul 7, 2026
dab0f6c
Support rebuilding versions
0xTim Jul 7, 2026
0989253
Update workflow
0xTim Jul 7, 2026
8f967f0
Add all the packages
0xTim Jul 7, 2026
80f7013
Better package version support
0xTim Jul 7, 2026
ac66efd
Use local design to test local assets
0xTim Jul 8, 2026
6f5cf90
Some tidy ups
0xTim Jul 8, 2026
140abab
Update 404 page
0xTim Jul 8, 2026
d92c215
Remove old files
0xTim Jul 8, 2026
9bb6f6f
Update CSP
0xTim Jul 8, 2026
34f073c
Bump dependencies to release
0xTim Jul 9, 2026
05c3aec
Tidy up
0xTim Jul 9, 2026
0540f73
Fix warnings in workflow
0xTim Jul 9, 2026
b207258
Add PR deploy workflows
0xTim Jul 9, 2026
ea1a83f
Fix stack
0xTim Jul 9, 2026
1020bdb
Reauth to avoid timeouts
0xTim Jul 9, 2026
4635535
Update README
0xTim Jul 9, 2026
203ff14
Update action
0xTim Jul 9, 2026
9439a42
Package updates
0xTim Jul 10, 2026
8f3aebd
Add module image
0xTim Jul 15, 2026
bb8073d
Revert image changes
0xTim Jul 15, 2026
6a04f92
Pull in version of Kiln that has the fixes
0xTim Jul 15, 2026
5340697
Package updates
0xTim Jul 16, 2026
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
97 changes: 0 additions & 97 deletions .github/workflows/build-and-deploy-docs-workflow.yml

This file was deleted.

43 changes: 0 additions & 43 deletions .github/workflows/deploy-api-docs.yml

This file was deleted.

114 changes: 114 additions & 0 deletions .github/workflows/deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,114 @@
name: Deploy API Docs

on:
push:
branches: [main]
workflow_call:
inputs:
package:
description: "Package repo to rebuild e.g. vapor/jwt-kit"
type: string
required: true
ref:
description: "Branch to use"
type: string
required: false
default: ""
workflow_dispatch:
inputs:
package:
description: "Package repo to rebuild (leave blank to build all packages)"
type: string
required: false
default: ""
ref:
description: "Branch of the package to rebuild"
type: string
required: false
default: ""
rebuild-all:
description: "Regenerate every DocC archive from scratch."
type: boolean
required: false
default: false

concurrency:
group: deploy-api-docs
cancel-in-progress: false

permissions:
id-token: write
contents: read

env:
AWS_PAGER: ""
ARCHIVE_BUCKET: s3://vapor-api-docs-archives

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v7
with:
repository: vapor/api-docs
ref: main

- name: Install Swift
uses: vapor/swiftly-action@bedb227456c5f495afbef80baebee17a8a02cef4 # v0.2.1
with:
toolchain: latest

- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b # v6.2.1
with:
role-to-assume: ${{ vars.OIDC_ROLE_ARN }}
aws-region: ${{ vars.OIDC_ROLE_REGION }}

- name: Restore DocC archive cache
run: aws s3 sync "$ARCHIVE_BUCKET" ./Content/archives --no-progress
- name: Build site
env:
PACKAGE: ${{ inputs.package }}
REF: ${{ inputs.ref }}
REBUILD_ALL: ${{ inputs.rebuild-all }}
run: |
args=()
if [ "$REBUILD_ALL" = "true" ]; then
args+=(--rebuild-all)
elif [ -n "$PACKAGE" ] && [ -n "$REF" ]; then
args+=(--rebuild "${PACKAGE}@${REF}")
elif [ -n "$PACKAGE" ]; then
args+=(--rebuild "$PACKAGE")
fi
swift run APIDocs "${args[@]}"

# Re-assume: a cold-cache build can outrun the 1h assume-role session.
- name: Refresh AWS credentials
uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b # v6.2.1
with:
role-to-assume: ${{ vars.OIDC_ROLE_ARN }}
aws-region: ${{ vars.OIDC_ROLE_REGION }}

- name: Save DocC archive cache
run: aws s3 sync ./Content/archives "$ARCHIVE_BUCKET" --no-progress --delete

- name: Deploy CloudFormation stack
uses: aws-actions/aws-cloudformation-github-deploy@81e3b03d2266bcb76c4bcc37a7d71d9cb67838bb # v2.2.0
with:
name: vapor-api-docs
template: stack.yaml
parameter-overrides: >-
BucketName=vapor-api-docs-site,
SubDomainName=api,
HostedZoneName=vapor.codes,
AcmCertificateArn=${{ secrets.API_DOCS_CERTIFICATE_ARN }}

- name: Deploy site to S3
env:
S3_BUCKET_URL: ${{ secrets.VAPOR_API_DOCS_S3_BUCKET_URL }}
run: aws s3 sync ./site "$S3_BUCKET_URL" --no-progress --acl public-read --delete

- name: Invalidate CloudFront
env:
DISTRIBUTION_ID: ${{ secrets.VAPOR_API_DOCS_DISTRIBUTION_ID }}
run: aws cloudfront create-invalidation --distribution-id "$DISTRIBUTION_ID" --paths "/*"
32 changes: 32 additions & 0 deletions .github/workflows/pr-closed.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: PR - Closed
on:
pull_request:
branches:
- main
types: [closed]
permissions:
contents: read
id-token: write
deployments: write

env:
AWS_PAGER: ""

jobs:
delete-s3:
name: Delete S3 Website
runs-on: ubuntu-latest
if: ${{ github.event.pull_request.head.repo.full_name == 'vapor/api-docs' && github.actor != 'dependabot[bot]' }}
steps:
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b # v6.2.1
with:
role-to-assume: ${{ vars.OIDC_ROLE_ARN }}
aws-region: ${{ vars.OIDC_ROLE_REGION }}
- name: Delete Website Bucket
uses: brokenhandsio/s3-website-pr-action@6ebd9b622b4bb33358228571a50e05d375cbd4de # v3.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
bucket-prefix: "vapor-api-docs-pulls"
bucket-region: "eu-west-2"
62 changes: 62 additions & 0 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,62 @@
name: PR
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
on:
pull_request:
branches:
- main
permissions:
contents: read
id-token: write
deployments: write

env:
AWS_PAGER: ""
ARCHIVE_BUCKET: s3://vapor-api-docs-archives

jobs:
build:
name: Build and Deploy PR
runs-on: ubuntu-latest
steps:
- name: Install latest Swift
uses: vapor/swiftly-action@bedb227456c5f495afbef80baebee17a8a02cef4 # v0.2.1
with:
toolchain: latest
- name: Checkout code
uses: actions/checkout@v7
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.14"
- name: Setup CloudFormation linter
uses: ScottBrenner/cfn-lint-action@ed184e91f5085a2932501da8314e899e5e0ef5be # v2.7.1
- name: Run CloudFormation linter
run: cfn-lint -t stack.yaml
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b # v6.2.1
with:
role-to-assume: ${{ vars.OIDC_ROLE_ARN }}
aws-region: ${{ vars.OIDC_ROLE_REGION }}
- name: Restore DocC archive cache
run: aws s3 sync "$ARCHIVE_BUCKET" ./Content/archives --no-progress
- name: Build site
run: swift run APIDocs
# Re-assume: a cold-cache build can outrun the 1h assume-role session.
- name: Refresh AWS credentials
uses: aws-actions/configure-aws-credentials@254c19bd240aabef8777f48595e9d2d7b972184b # v6.2.1
with:
role-to-assume: ${{ vars.OIDC_ROLE_ARN }}
aws-region: ${{ vars.OIDC_ROLE_REGION }}
- name: Save DocC archive cache
run: aws s3 sync ./Content/archives "$ARCHIVE_BUCKET" --no-progress
- name: Deploy S3 Website
if: ${{ github.event.pull_request.head.repo.full_name == 'vapor/api-docs' && github.actor != 'dependabot[bot]' }}
uses: brokenhandsio/s3-website-pr-action@6ebd9b622b4bb33358228571a50e05d375cbd4de # v3.1.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
bucket-prefix: "vapor-api-docs-pulls"
folder-to-copy: "./site"
bucket-region: "eu-west-2"
4 changes: 4 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,7 @@ code
/packages
/swift-doc
/public
/site
/.build
/Content/archives
.vscode/
Binary file added Content/assets/api-og-2x.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Binary file added Content/assets/vapor-logo.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading