release/0.12.14 #2
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Trigger Docs Build | |
on: | |
release: | |
types: [published] | |
jobs: | |
vercel: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
repository: gitbutlerapp/gitbutler-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: pnpm install | |
- name: Add content | |
run: | | |
VERSION=$(echo ${{ github.event.release.tag_name }} | sed "s|^.*/||" ) | |
NEW_RELEASE_BODY=$(cat <<- END | |
{/* NEW_RELEASE */} | |
${{ github.event.release.body }} | |
END | |
) | |
ESCAPED_DATA="$(echo "${NEW_RELEASE_BODY}" | sed ':a;N;$!ba;s/\n/\\n/g' | sed 's/\$/\\$/g' | sed 's|<|\\\\<|g')" | |
NEW_CONTENT="$(echo "${ESCAPED_DATA}" | sed "s|## What's Changed|## ${VERSION}|")" | |
sed -i "s|{/\* NEW_RELEASE \*/}|${NEW_CONTENT}|" content/docs/releases.mdx | |
- name: Push changes | |
run: | | |
git config user.name github-actions | |
git config user.email [email protected] | |
git remote set-url origin https://x-access-token:${{ secrets.PAT_PUSH }}@github.com/gitbutlerapp/gitbutler-docs | |
git commit -am "[automated]: add release ${{ github.event.release.tag_name }}" | |
git push |