From d5053db0c3743661904476d94a2330a8e8dbc98f Mon Sep 17 00:00:00 2001 From: Nico Domino Date: Fri, 12 Jul 2024 19:45:40 +0200 Subject: [PATCH] feat: append `release.mdx` when release is created here (#4351) --- .github/workflows/release.yaml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index e54d3b093..aa270a9b2 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -1,5 +1,6 @@ name: Trigger Docs Build on: + workflow_dispatch: release: types: [published] @@ -7,6 +8,37 @@ jobs: vercel: runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 + with: + repository: gitbutlerapp/gitbutler-docs + path: docs + - uses: pnpm/action-setup@v4 + - uses: actions/setup-node@v4 + with: + node-version: lts/* + cache: "pnpm" + cache-dependency-path: | + pnpm-lock.yaml + - name: Install dependencies + run: cd docs && pnpm install + - name: Add content + run: | + NEW_CONTENT=$(cat <<- END + + + ${{ github.event.release.body }} + + END + + ) + sed -i "s||${NEW_CONTENT}|" + - name: Push changes + run: | + cd docs + git config user.name github-actions + git config user.email github-actions@github.com + git commit -am "feat: add release ${{ github.event.release.tag_name }}" + git push - name: Trigger Vercel Deploy Hook env: VERCEL_HOOK_URL: ${{ secrets.VERCEL_HOOK_URL }}