Skip to content
Draft
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
22 changes: 21 additions & 1 deletion .github/workflows/build-api-spec-html.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,8 @@ on:
pull_request:
branches:
- master
paths:
- 'specification/**'
workflow_dispatch:

jobs:
Expand All @@ -15,6 +17,10 @@ jobs:
- name: Checkout
uses: actions/checkout@v4

- name: Set short SHA
id: short-sha
run: echo "value=$(git rev-parse --short HEAD)" >> "$GITHUB_OUTPUT"

- name: Setup Node.js
uses: actions/setup-node@v4
with:
Expand Down Expand Up @@ -72,8 +78,22 @@ jobs:


- name: Upload API docs artifact
id: upload-artifact
uses: actions/upload-artifact@v4
with:
name: api-specs-html-docs
name: api-specs-html-docs-${{ steps.short-sha.outputs.value }}
path: build/api-docs
if-no-files-found: error

- name: Comment on PR with artifact links
if: github.event_name == 'pull_request'
uses: unsplash/comment-on-pr@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
with:
msg: |
## API Spec HTML Docs

Built from commit `${{ steps.short-sha.outputs.value }}` — [view workflow run](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }})

**Download HTML API Specs:** [api-specs-html-docs-${{ steps.short-sha.outputs.value }}.zip](${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}/artifacts/${{ steps.upload-artifact.outputs.artifact-id }})
Loading
Loading