Skip to content

Commit

Permalink
feat: deploy docs from CCI w/ netlify-cli (#3348)
Browse files Browse the repository at this point in the history
We're just going to accept that docs reflect the entire monorepo,
because:

- needs to make snippets from live code, we don't want that code living
anywhere special, just doc directives where the code lies
- we want to run tsdoc, that needs ~everything because of codegen,
typescript running etc

And netlify CI isn't really meant for this level of complexity. We use
netlify-cli instead.

---------

Co-authored-by: ludamad <adam@aztecprotocol.com>
  • Loading branch information
ludamad and ludamad0 authored Nov 18, 2023
1 parent ee11dec commit 624d733
Show file tree
Hide file tree
Showing 6 changed files with 24 additions and 1 deletion.
9 changes: 9 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -928,6 +928,15 @@ jobs:
- run:
name: "Build docs"
command: build docs
- run:
name: "Deploy docs"
command: |
if [ "$CIRCLE_BRANCH" == "master" ]; then
echo "Deploying docs (on master)."
docs/deploy_netlify.sh
else
echo "Skipping doc deploy (not on master)."
fi
e2e-join:
docker:
Expand Down
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,3 +8,6 @@ build/
cmake-build-debug
.terraform*
.bootstrapped

# Local Netlify folder
.netlify
1 change: 1 addition & 0 deletions build_manifest.yml
Original file line number Diff line number Diff line change
Expand Up @@ -173,6 +173,7 @@ docs:
rebuildPatterns:
- ^docs/
- ^.*.cpp$
- ^.*.hpp$
- ^.*.ts$
- ^.release-please-manifest.json$
- ^.*/noir-version.json$
Expand Down
2 changes: 1 addition & 1 deletion docs/.dockerignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
*.node_modules
**/node_modules
*.docusaurus
*.processed-docs
*.processed-docs-cache
Expand Down
1 change: 1 addition & 0 deletions docs/Dockerfile.dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
*

!docs
docs/node_modules
!l1-contracts/src
!l1-contracts/test
!barretenberg/cpp/src/barretenberg
Expand Down
9 changes: 9 additions & 0 deletions docs/deploy_netlify.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,9 @@
#!/bin/bash
[ -n "${BUILD_SYSTEM_DEBUG:-}" ] && set -x # conditionally trace
set -eu

extract_repo docs /usr/src extracted-repo
cd extracted-repo/src/docs
npm install netlify-cli -g
netlify deploy --site aztec-docs-dev
netlify deploy --site aztec-docs-dev --prod

0 comments on commit 624d733

Please sign in to comment.