From c2d9207a6656119e6ed3ad6ba0aa9c0e71c98f95 Mon Sep 17 00:00:00 2001 From: Gabe Cook Date: Tue, 2 Apr 2024 00:35:03 -0500 Subject: [PATCH] ci(publish-schema): Publish the JSON schema to GitHub Pages --- .github/workflows/publish-schema.yaml | 25 +++++++++++++++++++++++++ config_example.yaml | 2 +- 2 files changed, 26 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/publish-schema.yaml diff --git a/.github/workflows/publish-schema.yaml b/.github/workflows/publish-schema.yaml new file mode 100644 index 0000000..8102b62 --- /dev/null +++ b/.github/workflows/publish-schema.yaml @@ -0,0 +1,25 @@ +name: Publish Schema + +on: + push: + tags: + - "v*.*.*" + +jobs: + publish-schema: + name: Publish Schema + runs-on: ubuntu-latest + permissions: + contents: read + pages: write + id-token: write + steps: + - name: Checkout + uses: actions/checkout@v4 + - run: | + mkdir _site + cp -a internal/config/*.schema.json _site/ + - name: Upload artifact + uses: actions/upload-pages-artifact@v3 + - name: Deploy to GitHub Pages + uses: actions/deploy-pages@v4 diff --git a/config_example.yaml b/config_example.yaml index 5fd7200..2cc4209 100644 --- a/config_example.yaml +++ b/config_example.yaml @@ -1,4 +1,4 @@ -# yaml-language-server: $schema=https://raw.githubusercontent.com/gabe565/changelog-generator/main/internal/config/config.schema.json +# yaml-language-server: $schema=https://gabe565.github.io/changelog-generator/config.schema.json # Sorts the changelog by the commit message. # When empty, the order will match `git log`.