Skip to content

Commit

Permalink
New website (foxglove#867)
Browse files Browse the repository at this point in the history
  • Loading branch information
amacneil authored May 23, 2023
1 parent 6568348 commit a745fe1
Show file tree
Hide file tree
Showing 96 changed files with 9,846 additions and 2,359 deletions.
1 change: 1 addition & 0 deletions .gitattributes
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*.csv linguist-generated=true
*.db3 filter=lfs diff=lfs merge=lfs -text
*.mcap filter=lfs diff=lfs merge=lfs -text
*.pdf filter=lfs diff=lfs merge=lfs -text
*.png filter=lfs diff=lfs merge=lfs -text
*.webp filter=lfs diff=lfs merge=lfs -text
cpp/examples/protobuf/proto/** linguist-vendored=true linguist-generated=true
Expand Down
13 changes: 1 addition & 12 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -156,18 +156,6 @@ jobs:
- run: yarn test:conformance:generate-inputs --verify
- run: yarn test:conformance --runner rust-

docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn

- run: corepack enable && yarn install --immutable
- run: yarn docs:lint

cpp:
runs-on: ubuntu-latest
defaults:
Expand Down Expand Up @@ -220,6 +208,7 @@ jobs:
registry-url: https://registry.npmjs.org
- run: corepack enable && yarn install --immutable
- run: yarn dedupe --check
- run: yarn prettier:check
- run: yarn workspace @mcap/core lint:ci
- run: yarn workspace @mcap/core typecheck
- run: yarn workspace @mcap/core test
Expand Down
218 changes: 0 additions & 218 deletions .github/workflows/pages.yml

This file was deleted.

132 changes: 132 additions & 0 deletions .github/workflows/website.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,132 @@
name: Website

on:
push:
branches: [main]
pull_request:
branches: ["*"]

jobs:
docs-home:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
lfs: true

- uses: actions/setup-node@v3
with:
node-version: 16.x
cache: yarn

- run: corepack enable && yarn install --immutable

- run: yarn build
working-directory: website

- run: yarn typedoc --out website/build/docs/typescript

- uses: actions/upload-artifact@v3
with:
name: public
path: website/build
retention-days: 1

docs-cpp:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- run: make -C cpp ci-docs

- run: tar -czf docs-cpp.tgz __docs__/cpp

- uses: actions/upload-artifact@v3
with:
name: docs-cpp
path: docs-cpp.tgz
retention-days: 1

docs-python:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-python@v4
with:
python-version: 3.7

- run: pip install pipenv

- run: make -C python docs

- run: tar -czf docs-python.tgz __docs__/python

- uses: actions/upload-artifact@v3
with:
name: docs-python
path: docs-python.tgz
retention-days: 1

docs-swift:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: swift-actions/setup-swift@v1
with:
swift-version: "5.7"

- run: mkdir __docs__

- run: |
swift package \
--allow-writing-to-directory __docs__ \
generate-documentation --target MCAP \
--output-path __docs__/swift \
--disable-indexing \
--transform-for-static-hosting \
--hosting-base-path docs/swift
# https://github.com/actions/upload-artifact/issues/85
- run: tar -czf docs-swift.tgz __docs__/swift

- uses: actions/upload-artifact@v3
with:
name: docs-swift
path: docs-swift.tgz
retention-days: 1

docs-deploy:
runs-on: ubuntu-latest
needs:
- docs-home
- docs-cpp
- docs-python
- docs-swift
permissions:
contents: read
deployments: write
steps:
# need checkout so that cloudflare can detect git commit
- uses: actions/checkout@v3

- uses: actions/download-artifact@v3

- name: Extract API docs
run: |
for f in docs-*/*.tgz; do
(set -x; tar -xf $f)
done
mkdir -p public/docs
mv -v __docs__/* public/docs
- name: Deploy
uses: cloudflare/pages-action@v1
with:
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
apiToken: ${{ secrets.CLOUDFLARE_TOKEN }}
gitHubToken: ${{ github.token }}
branch: ${{ github.head_ref || github.ref_name }}
projectName: mcap
directory: public
4 changes: 4 additions & 0 deletions .prettierignore
Original file line number Diff line number Diff line change
@@ -1,2 +1,6 @@
# Prettier converts `` to ` in Markdown, which breaks Swift-DocC
**/*.docc/**/*.md
python/Pipfile.lock
tests/conformance/data/**/*.json
typescript/examples/flatbuffer/output/**/*.ts
website/.docusaurus
2 changes: 0 additions & 2 deletions docs/.prettierrc.yml → .prettierrc.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,3 @@
proseWrap: never

overrides:
- files: "*.ksy"
options:
Expand Down
Loading

0 comments on commit a745fe1

Please sign in to comment.