Build and deploy production documentation #71
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Production Deploy | |
run-name: Build and deploy production documentation | |
on: | |
push: | |
branches: [main] | |
# Allow running from the actions tab | |
workflow_dispatch: | |
inputs: | |
schema_branch: | |
description: 'Schema branch to pull from for /reference' | |
required: true | |
default: 'main' | |
permissions: | |
contents: write | |
id-token: write | |
pages: write | |
jobs: | |
build_docs_and_deploy: | |
name: Build the documentation and deploy | |
if: github.repository == 'overturemaps/docs' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out the docs repo | |
uses: actions/checkout@v3 | |
- name: Set up Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
- name: Install NPM dependencies | |
run: npm install --prefer-dedupe | |
- name: Build Docusaurus Pages 🔧 | |
env: | |
SCHEMA_BRANCH: ${{ inputs.schema_branch }} | |
run: npm run build | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
folder: build |