Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions .github/workflows/deploy-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ on:
- package.json
- package-lock.json
- .github/workflows/deploy-docs.yml
tags: ['v*']
workflow_dispatch: {}

permissions:
Expand All @@ -23,12 +22,10 @@ concurrency:

jobs:
build:
if: github.ref == 'refs/heads/main'
runs-on: ubuntu-latest
steps:
# Always build from main, never from the triggering ref: on a v* tag push
# github.ref is the tag, and site/next would then be built from the tag's
# spec instead of the current main HEAD. Released versions are read out of
# git history (git show <tag>:spec), so they are unaffected by this.
# Build next from main and released versions from their tags.
- uses: actions/checkout@v4
with:
ref: main
Expand All @@ -48,7 +45,7 @@ jobs:
runs-on: ubuntu-latest
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
url: https://openapi.apolloconfig.com
steps:
- id: deployment
uses: actions/deploy-pages@v4
21 changes: 21 additions & 0 deletions .github/workflows/dispatch-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
name: Dispatch API Docs Deployment
on:
push:
tags: ['v*']

permissions:
actions: write

jobs:
dispatch:
if: github.event.deleted == false
runs-on: ubuntu-latest
steps:
# Tag deployments can report success while Pages keeps serving old content.
# https://github.com/actions/deploy-pages/issues/383
- name: Start a deployment from main
env:
GH_TOKEN: ${{ github.token }}
run: |
gh workflow run deploy-docs.yml \
--repo "$GITHUB_REPOSITORY" --ref main
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
# apollo-openapi

![OpenAPI](https://img.shields.io/badge/spec-OpenAPI%203.0.1-blue)
[![Docs](https://img.shields.io/badge/docs-API%20reference-blue)](https://apolloconfig.github.io/apollo-openapi/)
[![Docs](https://img.shields.io/badge/docs-API%20reference-blue)](https://openapi.apolloconfig.com/)

This repository maintains the Apollo OpenAPI contract. The source of truth is
[`apollo-openapi.yaml`](apollo-openapi.yaml).
Expand All @@ -11,9 +11,14 @@ This repository maintains the Apollo OpenAPI contract. The source of truth is
Browse the rendered API reference for every released version (plus `next`
for the unreleased `main` HEAD):

**https://apolloconfig.github.io/apollo-openapi/**
**https://openapi.apolloconfig.com/**

See [all versions](https://apolloconfig.github.io/apollo-openapi/versions.html).
See [all versions](https://openapi.apolloconfig.com/versions.html).

Documentation changes on `main` deploy automatically. A `v*` tag push starts
the deployment workflow on `main` using `workflow_dispatch`, avoiding the
[Pages tag deployment issue](https://github.com/actions/deploy-pages/issues/383).
To retry a deployment, run **Deploy API Docs** manually on `main`.

Generated code is treated as a temporary verification artifact, not as
maintained source code or an official Apollo SDK. Apollo Portal pins a released
Expand Down
Loading