Skip to content

Commit f5f04d1

Browse files
authored
Merge branch 'main' into mar-attribution
2 parents a9f07f5 + 2997f19 commit f5f04d1

12 files changed

Lines changed: 723 additions & 1114 deletions

.github/dependabot.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,18 @@
22
version: 2
33
updates:
44

5+
# Maintain npm dependencies
6+
- package-ecosystem: "npm"
7+
directory: "/"
8+
schedule:
9+
interval: "weekly"
10+
open-pull-requests-limit: 5
11+
labels:
12+
- "bot"
13+
commit-message:
14+
prefix: "[CHORE](deps)"
15+
include: "scope"
16+
517
# Maintain GitHub Actions dependencies
618
- package-ecosystem: "github-actions"
719
directory: "/"

.github/workflows/production_deploy_documentation.yml

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -28,10 +28,13 @@ jobs:
2828
- name: Set up Node.js
2929
uses: actions/setup-node@v6
3030
with:
31-
node-version: '24'
31+
node-version-file: package.json
32+
33+
- name: Configure sustainable npm
34+
uses: lowlydba/sustainable-npm@ed089bd92235c2af803a951fba2bd42c59fbcd73 # v2.0.0
3235

3336
- name: Install NPM dependencies
34-
run: npm install --prefer-dedupe
37+
run: npm ci --prefer-dedupe
3538

3639
- name: Build Docusaurus Pages 🔧
3740
run: npm run build
Lines changed: 116 additions & 28 deletions
Original file line numberDiff line numberDiff line change
@@ -1,84 +1,172 @@
11
---
22
name: Staging Deploy
3-
run-name: Publish docs to staging website (for PR)
3+
run-name: Publish docs to staging website
44

55
on:
66
pull_request:
77
branches: [main]
88

9+
concurrency:
10+
group: staging-deploy-${{ github.event.number }}
11+
cancel-in-progress: true
12+
913
permissions:
1014
id-token: write
1115
contents: read
1216
pull-requests: write
1317

18+
env:
19+
DOCS_PATH: docs
20+
PREVIEW_PATH: /${{ github.event.repository.name }}/pr/${{ github.event.number }}
21+
PREVIEW_PATH_NO_AUTOGEN: /${{ github.event.repository.name }}/pr/${{ github.event.number }}-no-autogen
22+
STAGING_URL: https://staging.overturemaps.org
23+
SCHEMA_PREVIEW: false # Set to true to only publish Schema reference docs
24+
AWS_ROLE_ARN: arn:aws:iam::763944545891:role/pages-staging-oidc-overturemaps
25+
AWS_REGION: us-west-2
26+
1427
jobs:
15-
build:
16-
name: Build
28+
check-fork:
29+
name: Check fork
30+
runs-on: ubuntu-slim
31+
steps:
32+
- name: Staging deploy is not supported for fork PRs
33+
if: github.event.pull_request.head.repo.full_name != github.repository
34+
run: |
35+
echo "::warning title=Staging deploy not supported for fork PRs::Staging previews are only available for PRs from branches within this repository, not forks. Please open your PR from a branch in OvertureMaps/docs instead."
36+
37+
build-auto-gen:
38+
name: Build (auto-gen schema)
39+
if: github.event.pull_request.head.repo.full_name == github.repository
1740
runs-on: ubuntu-latest
41+
needs: check-fork
42+
outputs:
43+
schema-sha: ${{ steps.schema-docs.outputs.schema-sha }}
44+
schema-ref: ${{ steps.schema-docs.outputs.schema-ref }}
1845
steps:
1946
- name: Check out the main docs repo repository and build.
2047
uses: actions/checkout@v6
21-
with:
22-
fetch-depth: 0
2348

2449
- name: Set up Node.js
2550
uses: actions/setup-node@v6
2651
with:
27-
node-version: '24'
52+
node-version-file: 'package.json'
53+
54+
- uses: lowlydba/sustainable-npm@v2
2855

29-
- name: Install NPM dependencies
30-
run: npm ci --omit=dev
56+
- run: npm ci --omit=dev
57+
58+
- name: Generate schema markdown docs
59+
id: schema-docs
60+
uses: OvertureMaps/workflows/.github/actions/generate-schema-docs@main
61+
with:
62+
output-dir: ${{ github.workspace }}/docs/schema/reference
63+
schema-ref: 'dev' # Temporary until we feel confident in the generated schema sans human review, then should be 'main'
3164

3265
- name: Build Docusaurus website
33-
env:
34-
DOCUSAURUS_URL: https://staging.overturemaps.org/
35-
DOCUSAURUS_BASE_URL: /${{ github.event.repository.name }}/pr/${{ github.event.number }}/
3666
run: npm run build
67+
env:
68+
DOCUSAURUS_URL: ${{ env.STAGING_URL }}/
69+
DOCUSAURUS_BASE_URL: ${{ env.PREVIEW_PATH }}/
70+
SCHEMA_PREVIEW: ${{ env.SCHEMA_PREVIEW }}
3771

3872
- name: Upload docs build as an artifact 📦
3973
uses: actions/upload-artifact@v7
4074
with:
4175
path: build
4276
name: build-artifact
4377

78+
build-repo-schema:
79+
# Branch ruleset set to this job name to require this status check
80+
name: Build
81+
if: github.event.pull_request.head.repo.full_name == github.repository
82+
runs-on: ubuntu-latest
83+
needs: check-fork
84+
steps:
85+
- name: Check out the main docs repo repository and build.
86+
uses: actions/checkout@v6
87+
88+
- name: Set up Node.js
89+
uses: actions/setup-node@v6
90+
with:
91+
node-version-file: 'package.json'
92+
93+
- uses: lowlydba/sustainable-npm@v2
94+
95+
- run: npm ci --omit=dev
96+
97+
- name: Build Docusaurus website (using existing /schema/reference files)
98+
run: npm run build
99+
env:
100+
DOCUSAURUS_URL: ${{ env.STAGING_URL }}/
101+
DOCUSAURUS_BASE_URL: ${{ env.PREVIEW_PATH_NO_AUTOGEN }}/
102+
SCHEMA_PREVIEW: ${{ env.SCHEMA_PREVIEW }}
103+
104+
- name: Upload docs build as an artifact 📦
105+
uses: actions/upload-artifact@v7
106+
with:
107+
path: build
108+
name: build-artifact-no-autogen
109+
44110
deploy:
45111
name: Deploy
46-
runs-on: ubuntu-latest
47-
needs: build
112+
runs-on: ubuntu-slim
113+
needs: [check-fork, build-auto-gen, build-repo-schema]
48114
environment:
49115
name: staging
50-
url: https://staging.overturemaps.org/${{ github.event.repository.name }}/pr/${{ github.event.number }}/index.html
116+
url: ${{ env.STAGING_URL }}${{ env.PREVIEW_PATH }}/index.html
51117

52118
steps:
53119
- name: Configure AWS credentials 🔐
54120
uses: aws-actions/configure-aws-credentials@v6
55121
with:
56-
role-to-assume: arn:aws:iam::763944545891:role/pages-staging-oidc-overturemaps
57-
aws-region: us-west-2
122+
role-to-assume: ${{ env.AWS_ROLE_ARN }}
123+
aws-region: ${{ env.AWS_REGION }}
58124

59-
- name: Download artifacts 📥
125+
- name: Download auto-gen artifact 📥
60126
uses: actions/download-artifact@v8
61127
with:
62128
name: build-artifact
63-
path: build
129+
path: build-autogen
130+
131+
- name: Download repo schema artifact 📥
132+
uses: actions/download-artifact@v8
133+
with:
134+
name: build-artifact-no-autogen
135+
path: build-no-autogen
64136

65137
- name: Copy to S3
66138
run: |
67-
aws s3 sync --delete build s3://overture-managed-staging-usw2/gh-pages/${{ github.event.repository.name }}/pr/${{ github.event.number }}/
139+
aws s3 sync --delete --quiet build-autogen s3://overture-managed-staging-usw2/gh-pages${{ env.PREVIEW_PATH }}/
140+
aws s3 sync --delete --quiet build-no-autogen s3://overture-managed-staging-usw2/gh-pages${{ env.PREVIEW_PATH_NO_AUTOGEN }}/
141+
68142
- name: Bust the Cache
69-
run: aws cloudfront create-invalidation --distribution-id E1KP2IN0H2RGGT --paths "/${{ github.event.repository.name }}/pr/${{ github.event.number }}/*"
143+
run: |
144+
aws cloudfront create-invalidation --distribution-id E1KP2IN0H2RGGT --paths "${{ env.PREVIEW_PATH }}/*" "${{ env.PREVIEW_PATH_NO_AUTOGEN }}/*"
70145
71-
- name: Get deploy timestamp
72-
id: timestamp
73-
run: echo "time=$(date -u +'%Y-%m-%dT%H:%M:%SZ')" >> $GITHUB_OUTPUT
146+
- name: Gather metadata for PR comment
147+
id: deploy-metadata
148+
run: |
149+
echo "time=$(date -u +'%b %d, %Y %H:%M UTC')" >> $GITHUB_OUTPUT
150+
echo "short-sha=$(echo '${{ github.event.pull_request.head.sha }}' | cut -c1-7)" >> $GITHUB_OUTPUT
151+
echo "schema-ref-short=$(echo '${{ needs.build-auto-gen.outputs.schema-ref }}' | sed 's|refs/heads/||;s|refs/tags/||')" >> $GITHUB_OUTPUT
152+
echo "schema-short-sha=$(echo '${{ needs.build-auto-gen.outputs.schema-sha }}' | cut -c1-7)" >> $GITHUB_OUTPUT
74153
75154
- name: Comment on PR
76-
uses: marocchino/sticky-pull-request-comment@v3
155+
uses: marocchino/sticky-pull-request-comment@70d2764d1a7d5d9560b100cbea0077fc8f633987 # v3.0.2
77156
with:
78157
message: |
79-
## 🚀 Overture Maps docs branch preview deployed!
158+
## 🗺️ OMF Docs previews are live!
159+
160+
| | |
161+
|-------------------------|----------------------------------------------------------------------|
162+
| 🆕 **Auto-gen schema site (beta)** | ${{ env.STAGING_URL }}${{ env.PREVIEW_PATH }}/index.html |
163+
| 🗂️ **Auto-gen schema ref** | [${{ steps.deploy-metadata.outputs.schema-ref-short }}@${{ steps.deploy-metadata.outputs.schema-short-sha }}](https://github.com/OvertureMaps/schema/commit/${{ needs.build-auto-gen.outputs.schema-sha }}) |
164+
| 🌍 **Repo schema site** | ${{ env.STAGING_URL }}${{ env.PREVIEW_PATH_NO_AUTOGEN }}/index.html |
165+
| 🕐 **Updated** | ${{ steps.deploy-metadata.outputs.time }} |
166+
| 📝 **Commit** | [${{ steps.deploy-metadata.outputs.short-sha }}](${{ github.server_url }}/${{ github.repository }}/commit/${{ github.event.pull_request.head.sha }}) |
80167
81-
You can review your changes at https://staging.overturemaps.org/${{ github.event.repository.name }}/pr/${{ github.event.number }}/index.html
168+
Auto-gen schema site is now available. This is an early preview of a future workflow where we will automatically generate and publish reference docs for the Overture Maps Format schema with every change to the schema repo.
169+
The auto-gen schema site may contain incomplete or inaccurate information as we are still refining the generation process, so please compare against the repo schema site and refer to the linked commit for the most up-to-date source of truth.
82170
83-
---
84-
<sub>♻️ Last refreshed: ${{ steps.timestamp.outputs.time }}</sub>
171+
> [!NOTE]
172+
> ♻️ This preview updates automatically with each push to this PR.
Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
1+
---
2+
name: Staging Deploy Cleanup
3+
run-name: ♻️ Clean up staging preview for PR #${{ github.event.number }}
4+
5+
on:
6+
pull_request:
7+
types: [closed]
8+
9+
permissions:
10+
contents: read
11+
12+
jobs:
13+
cleanup:
14+
name: Cleanup
15+
if: github.event.pull_request.head.repo.full_name == github.repository
16+
runs-on: ubuntu-slim
17+
permissions:
18+
id-token: write
19+
env:
20+
AWS_ROLE_ARN: arn:aws:iam::763944545891:role/pages-staging-oidc-overturemaps
21+
AWS_REGION: us-west-2
22+
23+
steps:
24+
- name: Configure AWS credentials
25+
uses: aws-actions/configure-aws-credentials@v6
26+
with:
27+
role-to-assume: ${{ env.AWS_ROLE_ARN }}
28+
aws-region: ${{ env.AWS_REGION }}
29+
30+
# No flags to ignore "not found" errors, so we use "|| true" to prevent failure if the path doesn't exist
31+
- name: Delete from S3
32+
run: |
33+
aws s3 rm --recursive \
34+
s3://overture-managed-staging-usw2/gh-pages/${{ github.event.repository.name }}/pr/${{ github.event.number }}/ || true
35+
aws s3 rm --recursive \
36+
s3://overture-managed-staging-usw2/gh-pages/${{ github.event.repository.name }}/pr/${{ github.event.number }}-no-autogen/ || true
37+
38+
- name: Bust the cache
39+
run: |
40+
aws cloudfront create-invalidation \
41+
--distribution-id E1KP2IN0H2RGGT \
42+
--paths "/${{ github.event.repository.name }}/pr/${{ github.event.number }}/*" || true

CODEOWNERS

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,7 @@
11
# Default owners for everything in the repo
22
* @overturemaps/omf-public-reviewers
33

4+
# Devops
45
/.github @lowlydba @overturemaps/omf-public-reviewers
6+
/package.json @lowlydba @overturemaps/omf-public-reviewers
7+
/package-lock.json @lowlydba @overturemaps/omf-public-reviewers

blog/2025-05-21-release-notes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,7 +48,7 @@ s3://overturemaps-us-west-2/bridgefiles/2025-05-21.0
4848

4949
## GERS IDs will become UUIDs in June
5050

51-
In next month's release (late June), Overture is standardizing the [`id` property](/schema/#top-level-properties) across all themes by adopting [UUIDs](https://www.rfc-editor.org/rfc/rfc9562.html), stored as strings.
51+
In next month's release (late June), Overture is standardizing the [`id` property](/schema/) across all themes by adopting [UUIDs](https://www.rfc-editor.org/rfc/rfc9562.html), stored as strings.
5252

5353
Currently the structure of our IDs varies slightly across datasets, with some themes embedding metadata (e.g. [H3](https://h3geo.org/)) in the `id` property. The new UUIDs will be randomly-generated identifiers with no encoded information. Moving to UUIDs enables consistent ID generation and registration across our data pipelines, which is necessary for the successful implementation of [GERS](/gers).
5454

blog/2025-06-25-release-notes.mdx

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,7 +66,7 @@ You can access the datasets by following the process outlined [here](/getting-da
6666

6767
## What's new? Big changes to GERS.
6868

69-
In this release, Overture has standardized the [`id` property](/schema/#top-level-properties) across all themes by adopting [UUIDs](https://www.rfc-editor.org/rfc/rfc9562.html), stored as strings. This is a **one-time** breaking change for our ID system. For this release only, we are offering Parquet files, partioned by `theme` and `type` that map the old May IDs to the new June UUIDs. You can find that file here: `s3://overturemaps-extras-us-west-2/june_to_may_id_mapping/`.
69+
In this release, Overture has standardized the [`id` property](/schema/) across all themes by adopting [UUIDs](https://www.rfc-editor.org/rfc/rfc9562.html), stored as strings. This is a **one-time** breaking change for our ID system. For this release only, we are offering Parquet files, partioned by `theme` and `type` that map the old May IDs to the new June UUIDs. You can find that file here: `s3://overturemaps-extras-us-west-2/june_to_may_id_mapping/`.
7070

7171
Overture is now producing [bridge files](https://docs.overturemaps.org/gers/bridge-files/) with each release. You can find the latest bridge files here, partitioned by `dataset`, `theme`, and `type`:
7272

File renamed without changes.

0 commit comments

Comments
 (0)