Having @open-sauced docs built using Docusaurus, we started exploring the plugin ecosystem and identified various improvements we could apply.
One of the community plugins we found during that process was signcl/docusaurus-prince-pdf, an npm package leveraging sindresorhus/got to crawl all the documentation and generate a PDF version.
Having a portable document generated as a downloadable release asset, we could more easily share the entirety of our docs and have that document available for offline use.
We faced the challenge of having to access the upcoming version during the deployment workflow, installing additional binaries, and deploying the generated asset as part of the release.
In order to generate a handbook out of a Docusaurus instance we need to build the application in a container before uploading it as a build artifact for later workflow steps.
This is all taken care of in the new docker job that was created for the hackaton:
Concurrently, the build job prepares static npm assets and uploads them as an artifact for a subsequent job:
jobs:build:name:Build applicationruns-on:ubuntu-lateststeps:-name:"βοΈcheckoutrepository"uses:actions/checkout@v2-name:"π§setupnode"uses:actions/setup-node@v2.1.5with:node-version:16-name:"π§installnpm@latest"run:npm i -g npm@latest-name:"π¦installdependencies"uses:bahmutov/npm-install@v1-name:"πstaticapp"run:npm run build-name:"πproductionartifacts"uses:actions/upload-artifact@v2with:name:buildpath:build
We encourage you to contribute to OpenSauced! All contributors are required to abide by our Code of Conduct. Please check out the Contributing guide for guidelines about how to proceed with your contribution.
π₯οΈ Development
npm ci
npm start
π Community
Got Questions? Join the conversation in our Community.
Find OpenSauced videos and release overviews on our YouTube Channel.