Skip to content

Commit

Permalink
docs: auto-bump new docs version workflow (#280)
Browse files Browse the repository at this point in the history
  • Loading branch information
stijnmoreels authored Feb 21, 2025
1 parent 380e51c commit 483257d
Showing 1 changed file with 48 additions and 0 deletions.
48 changes: 48 additions & 0 deletions .github/workflows/bump-docs-version.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
name: Bump new docs version

on:
workflow_dispatch:
inputs:
version:
description: 'Specify the new version to bump (e.g. v1.1.0)'
required: true

jobs:
generate-new-version:
runs-on: ubuntu-latest

steps:
- name: Checkout code
uses: actions/checkout@v2
with:
fetch-depth: 0

- name: navigate to docs folder
run: cd docs

- name: Install npm dependencies
run: npm install

- name: Generate new version
run: npm run docusaurus docs:version ${{ github.event.inputs.version }}

- name: Check for changes
run: |
if git diff --quiet; then
echo "No changes detected."
exit 0
fi
- name: Configure Git
run: |
git config --global user.name "github-actions[bot]"
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- name: Create Pull Request
uses: peter-evans/create-pull-request@v6
with:
branch: "docs(${{ github.event.inputs.version }})/bump-docs-version"
title: "docs(${{ github.event.inputs.version }}): bump new docs version"
body: "This automatically generated PR bumps the docs version to ${{ github.event.inputs.version }}."
commit-message: "docs(${{ github.event.inputs.version }}): bump new docs version"
delete-branch: true

0 comments on commit 483257d

Please sign in to comment.