Skip to content

Commit

Permalink
chore: build docs in earthly
Browse files Browse the repository at this point in the history
  • Loading branch information
just-mitch committed Apr 25, 2024
1 parent 99e12b1 commit 70bf739
Show file tree
Hide file tree
Showing 5 changed files with 58 additions and 1 deletion.
4 changes: 4 additions & 0 deletions Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,7 @@ test-end-to-end:

bench:
RUN echo hi

release-meta:
COPY .release-please-manifest.json /usr/src/.release-please-manifest.json
SAVE ARTIFACT /usr/src /usr/src
4 changes: 4 additions & 0 deletions docs/.earthlyignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
.docusaurus
node_modules
processed-docs
processed-docs-cache
37 changes: 37 additions & 0 deletions docs/Earthfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
VERSION 0.8

FROM node:18.19.0
WORKDIR /usr/src/docs

deps:
COPY ./yarn.lock ./yarn.lock
COPY ./package.json ./package.json
RUN yarn install --frozen-lockfile

build:
BUILD ../yarn-project/+build-dev
BUILD ../+release-meta
FROM +deps

RUN apt update && apt install -y jq curl perl && rm -rf /var/lib/apt/lists/* && apt-get clean

COPY --dir ../yarn-project/+build-dev/usr/src /usr
COPY ../+release-meta/usr/src/.release-please-manifest.json /usr/src

COPY . .

RUN ./scripts/build.sh
SAVE ARTIFACT build

serve:
FROM +deps
COPY +build/build build
COPY ./static static
COPY ./src src
COPY ./docusaurus.config.js .
COPY ./sidebars.js .
ENTRYPOINT ["yarn", "serve"]
EXPOSE 3000
SAVE IMAGE aztecprotocol/docs-server


10 changes: 9 additions & 1 deletion docs/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1563,7 +1563,7 @@
"@docusaurus/theme-search-algolia" "2.4.3"
"@docusaurus/types" "2.4.3"

"@docusaurus/react-loadable@5.5.2", "react-loadable@npm:@docusaurus/react-loadable@5.5.2":
"@docusaurus/react-loadable@5.5.2":
version "5.5.2"
resolved "https://registry.yarnpkg.com/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz#81aae0db81ecafbdaee3651f12804580868fa6ce"
integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==
Expand Down Expand Up @@ -7026,6 +7026,14 @@ react-loadable-ssr-addon-v5-slorber@^1.0.1:
dependencies:
"@babel/runtime" "^7.10.3"

"react-loadable@npm:@docusaurus/react-loadable@5.5.2":
version "5.5.2"
resolved "https://registry.yarnpkg.com/@docusaurus/react-loadable/-/react-loadable-5.5.2.tgz#81aae0db81ecafbdaee3651f12804580868fa6ce"
integrity sha512-A3dYjdBGuy0IGT+wyLIGIKLRE+sAk1iNk0f1HjNDysO7u8lhL4N3VEm+FAubmJbAztn94F7MxBTPmnixbiyFdQ==
dependencies:
"@types/react" "*"
prop-types "^15.6.2"

react-markdown@6.0.0:
version "6.0.0"
resolved "https://registry.yarnpkg.com/react-markdown/-/react-markdown-6.0.0.tgz#e63cd32d095e864384d524986c44c34c919de517"
Expand Down
4 changes: 4 additions & 0 deletions yarn-project/Earthfile
Original file line number Diff line number Diff line change
Expand Up @@ -47,6 +47,10 @@ build:
ENV PUPPETEER_SKIP_CHROMIUM_DOWNLOAD=true
RUN ./bootstrap.sh full

build-dev:
FROM +build
SAVE ARTIFACT /usr/src /usr/src

aztec-prod:
FROM +build
RUN yarn workspaces focus @aztec/aztec --production && yarn cache clean
Expand Down

0 comments on commit 70bf739

Please sign in to comment.