Skip to content

Build and deploy production documentation #193

Build and deploy production documentation

Build and deploy production documentation #193

---
name: Production Deploy
run-name: Build and deploy production documentation
on:
push:
branches: [main]
# Allow running from the actions tab
workflow_dispatch:
permissions:
id-token: write # required to use OIDC authentication
contents: read # required to checkout the code from the repo
pages: write # for actions/deploy-pages
jobs:
build:
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@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: '24'
- name: Install NPM dependencies
run: npm install --prefer-dedupe
- name: Build Docusaurus Pages 🔧
run: npm run build
- name: Setup Pages 🗂️
uses: actions/configure-pages@v5
- name: Upload static files as GH-Pages artifact 📦
id: docs-website
uses: actions/upload-pages-artifact@v4
with:
path: build
deploy:
name: Deploy to GitHub Pages
needs: build
environment:
name: github-pages
url: https://docs.overturemaps.org/
runs-on: ubuntu-latest
steps:
- name: Deploy to GitHub Pages 🚀
id: docs-website
uses: actions/deploy-pages@v4