Add GitHub Copilot instructions and offline mode support for documentation builds #1984
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR adds comprehensive GitHub Copilot instructions to help coding agents work effectively with the Pomerium documentation repository and implements offline mode support for network-restricted environments.
Changes Made
1. Created
.github/copilot-instructions.mdAdded exhaustive instructions covering:
2. Enhanced
docusaurus.config.jswith Offline Mode SupportImplemented conditional plugin loading to handle network dependencies:
This allows the documentation to build successfully in environments without access to external APIs by setting:
Problem Solved
The repository previously had a hard dependency on external API access (
console.pomerium.app/openapi.yaml) through the redocusaurus plugin, causing builds to fail in sandboxed or network-restricted environments. The new offline mode gracefully handles this by:POMERIUM_DOCS_OFFLINE=1is setValidation
All documented commands have been tested and verified to work as specified:
POMERIUM_DOCS_OFFLINE=1)The instructions emphasize NEVER CANCEL warnings for long-running commands with specific timeout recommendations to prevent premature termination of builds that legitimately take several minutes to complete.
Fixes #1983.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
console.pomerium.app/usr/local/bin/node /home/REDACTED/work/documentation/documentation/node_modules/.bin/docusaurus build(dns block)/usr/local/bin/node /home/REDACTED/work/documentation/documentation/node_modules/.bin/docusaurus start --no-open --port 3001(dns block)googlechromelabs.github.io/usr/local/bin/node install.mjs(dns block)https://storage.googleapis.com/chrome-for-testing-public/127.0.6533.88/linux64/chrome-linux64.zip/usr/local/bin/node install.mjs(http block)If you need me to access, download, or install something from one of these locations, you can either:
✨ Let Copilot coding agent set things up for you — coding agent works faster and does higher quality work when set up for your repo.