Skip to content

Commit

Permalink
feat(docs): Publish PDF of protocol specs + remove links to pages in …
Browse files Browse the repository at this point in the history
…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: AztecProtocol/dev-rel#260

---------

Co-authored-by: ludamad <adam.domurad@gmail.com>
  • Loading branch information
critesjosh and ludamad authored Jun 21, 2024
1 parent 7746363 commit 367e3cf
Show file tree
Hide file tree
Showing 2 changed files with 39 additions and 9 deletions.
39 changes: 39 additions & 0 deletions .github/workflows/publish-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
9 changes: 0 additions & 9 deletions docs/sidebars.js
Original file line number Diff line number Diff line change
Expand Up @@ -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",
Expand All @@ -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",
Expand Down Expand Up @@ -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",
Expand Down

0 comments on commit 367e3cf

Please sign in to comment.