The deployments subject contains documentation and build scripts for deploying docs.github.com to production and staging environments. This includes Docker build configuration, repository fetching scripts, and deployment procedures.
This subject is responsible for:
- Production deployment configuration and automation
- Staging server deployment processes
- Docker image build scripts for fetching repos (early-access, translations)
- Deployment documentation and procedures
- Integration with Moda (GitHub's internal deployment platform)
production/build-scripts/fetch-repos.sh- Main script that orchestrates fetching docs-early-access and all translation repos during Docker buildproduction/build-scripts/clone-or-use-cached-repo.sh- Utility function to clone repos or use cached versionsproduction/build-scripts/merge-early-access.sh- Merges early-access content into production contentDockerfile(root) - Multi-stage Docker build for production deployments.github/workflows/moda-ci.yaml- CI/CD workflow that builds and deploys via Moda
Production deploys happen automatically:
- Pushing to
mainbranch triggers automatic deployment to production - Status updates posted in
#docs-opsSlack channel - Deployment uses Moda (GitHub's internal deployment platform)
docker build -t docs:latest . --secret id=DOCS_BOT_PAT_BASE,src=<(echo "<your GH PAT value>")Requirements for PAT:
- Must have
contents: readaccess to:- All
docs-internal.<lang>translation repos docs-early-accessrepo
- All
Run the built image locally.
To deploy to a staging server:
- Push your branch to
docs-internal - Open a draft PR
- Wait for
docs-internal Moda CIchecks to pass - In
#docs-opsSlack, run:.deploy docs-internal/<your-branch> to staging-<your-username> - Access at
https://docs-staging-<your-username>.service.iad.github.net(requires Developer VPN)
No subject-specific tests exist currently. CI/CD validation happens through Moda workflows.
- Dockerfile and build scripts
- GitHub PAT for private repo access (
DOCS_BOT_PAT_BASE) - Early access repo (
docs-early-access)
- Docker and Docker BuildKit
- Moda platform (GitHub internal)
- GitHub Vault for secrets management
- Node.js (installed during Docker build)
- Git (for cloning repos during build)
- Clone docs-internal content, assets, data
- Fetch and merge docs-early-access
- Fetch all translation repos in parallel
- Install production dependencies
- Build Next.js application
- Create production Docker image
- Docker image with full site content (public + early-access + translations)
- Deployed application on Moda infrastructure
- Deployment notifications in Slack
src/early-access- Early access content merged during buildsrc/languages- Translation repos fetched during build- Root
Dockerfile- Docker build configuration .github/workflows/moda-ci.yaml- CI/CD workflow
For detailed internal documentation, see:
Modadirectory in internal Docs Engineering repo- Production deploy procedures (internal docs)
- Team: Docs Engineering
- Slack: #build, #deploy-support (for deployment status and commands)
- Build scripts are shell scripts, not TypeScript (different from rest of codebase)
- Requires VPN access for staging server access
- Local Docker builds require manual PAT management
- Deployment status posted to
#docs-opsSlack channel - Moda provides deployment dashboards and logs (internal)
- Rollback procedures documented in internal Docs Engineering repo
DOCS_BOT_PAT_BASE- GitHub PAT with access to private repos- Managed via GitHub Vault
- Passed securely to Docker build via
--secretflag
Rollback procedures are documented in the internal Docs Engineering repository. Contact @docs-engineering or #deploy-support assistance.