From 367e3cf55f0281658c3da3ccd2b6cc87b707cb92 Mon Sep 17 00:00:00 2001 From: josh crites Date: Fri, 21 Jun 2024 12:10:28 -0400 Subject: [PATCH] feat(docs): Publish PDF of protocol specs + remove links to pages in item lists in protocol specs (#6684) Linking to pages that are in the category items are redundant are messing up [this](https://github.com/signcl/docusaurus-prince-pdf) docs to pdf tool. The plan is to include a command like ```bash npx docusaurus-prince-pdf -u http://docs.aztec.network/protocol-specs/intro --dest ./docs/pdf -o protocol-specs ``` to the release pipeline, so once the new docs site is published, all of the pages under docs.aztec.network/protocol-specs are added to a file called `protocol-specs.pdf` in `docs/pdf`. closes: https://github.com/AztecProtocol/dev-rel/issues/260 --------- Co-authored-by: ludamad --- .github/workflows/publish-docs.yml | 39 ++++++++++++++++++++++++++++++ docs/sidebars.js | 9 ------- 2 files changed, 39 insertions(+), 9 deletions(-) diff --git a/.github/workflows/publish-docs.yml b/.github/workflows/publish-docs.yml index 11a065c8938..e1abe1531d9 100644 --- a/.github/workflows/publish-docs.yml +++ b/.github/workflows/publish-docs.yml @@ -29,3 +29,42 @@ jobs: - timeout-minutes: 25 run: earthly-ci --no-output ./docs/+deploy-prod --NETLIFY_AUTH_TOKEN=${{ secrets.NETLIFY_AUTH_TOKEN }} --NETLIFY_SITE_ID=${{ secrets.NETLIFY_SITE_ID }} --COMMIT_TAG=${{ inputs.tag }} + + pdf: + needs: setup + runs-on: master-x86 + steps: + - name: Checkout + uses: actions/checkout@v3 + with: + token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} + path: aztec-packages + - name: Install Prince + run: | + curl https://www.princexml.com/download/prince-14.2-linux-generic-x86_64.tar.gz -O + tar zxf prince-14.2-linux-generic-x86_64.tar.gz + cd prince-14.2-linux-generic-x86_64 + yes "" | sudo ./install.sh + - name: Serve docs + run: | + cd aztec-packages/docs + yarn build + yarn serve & + - name: Checkout PDF repo + uses: actions/checkout@v3 + with: + token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }} + repository: AztecProtocol/protocol-specs-pdf + path: protocol-specs-pdf + - name: Generate PDF + run: | + npx docusaurus-prince-pdf -u http://localhost:3000/protocol-specs/intro --output protocol-specs-pdf/protocol-specs.pdf + timeout-minutes: 4 + - name: Push to PDF repo + run: | + git config --global user.name AztecBot + git config --global user.email tech@aztecprotocol.com + cd protocol-specs-pdf + git add protocol-specs.pdf + git commit -m "chore: update protocol-specs.pdf" + git push origin main diff --git a/docs/sidebars.js b/docs/sidebars.js index 1b84e84f303..9e9383590d8 100644 --- a/docs/sidebars.js +++ b/docs/sidebars.js @@ -59,10 +59,6 @@ export default { { label: "Proving System", type: "category", - link: { - type: "doc", - id: "protocol-specs/cryptography/proving-system/performance-targets", - }, items: [ "protocol-specs/cryptography/proving-system/performance-targets", "protocol-specs/cryptography/proving-system/overview", @@ -72,10 +68,6 @@ export default { { label: "Hashing", type: "category", - link: { - type: "doc", - id: "protocol-specs/cryptography/hashing/hashing", - }, items: [ "protocol-specs/cryptography/hashing/hashing", "protocol-specs/cryptography/hashing/poseidon2", @@ -217,7 +209,6 @@ export default { { label: "Decentralization", type: "category", - link: { type: "doc", id: "protocol-specs/decentralization/governance" }, items: [ "protocol-specs/decentralization/actors", "protocol-specs/decentralization/governance",