gitbutler/.github/workflows/release.yaml

47 lines
1.2 KiB
YAML

name: Trigger Docs Build
on:
workflow_dispatch:
release:
types: [published]
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
<!-- NEW RELEASE -->
${{ github.event.release.body }}
END
)
sed -i "s|<!-- NEW RELEASE -->|${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 }}
run: curl -s $VERCEL_HOOK_URL