Skip to content
This repository was archived by the owner on Jul 29, 2025. It is now read-only.

docs: add notice about source code move (#258) #208

docs: add notice about source code move (#258)

docs: add notice about source code move (#258) #208

# This workflow is centrally managed in https://github.com/asyncapi/.github/
# Don't make changes to this file in this repo as they will be overwritten with changes made to the same file in above mentioned repo
# The given workflow is responsible for generating docs and creating PR with them when there is a commit with docs: prefix
# This workflow will be updated in all repos with the topic get-global-docs-autoupdate
name: 'Update generated parts of documentation on docs: commits'
on:
push:
branches:
- master
jobs:
docs-gen:
name: 'Generate docs and create PR'
runs-on: ubuntu-latest
# PR should be created within this GH action only if it is a docs: commit
# Otherwise it will conflict with release workflow
if: startsWith(github.event.commits[0].message, 'docs:')
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Check package-lock version
uses: asyncapi/.github/.github/actions/get-node-version-from-package-lock@master
id: lockversion
- name: Use Node.js
uses: actions/setup-node@v4
with:
node-version: "${{ steps.lockversion.outputs.version }}"
cache: 'npm'
cache-dependency-path: '**/package-lock.json'
- name: Install dependencies
run: npm ci
- name: Regenerate docs
run: npm run generate:assets --if-present
- name: Create Pull Request with updated docs
uses: peter-evans/create-pull-request@271a8d0340265f705b14b6d32b9829c1cb33d45e # uses 7.0.8 https://github.com/peter-evans/create-pull-request/releases/tag/v7.0.8
with:
token: ${{ secrets.GH_TOKEN }}
commit-message: 'chore: update generated docs'
committer: asyncapi-bot <[email protected]>
author: asyncapi-bot <[email protected]>
title: 'chore: update generated docs'
body: 'Update of docs that are generated and were forgotten on PR level.'
branch: gen-docs-update/${{ github.job }}
- name: Report workflow status to Slack
if: failure() # Only, on failure, send a message on the 94_bot-failing-ci slack channel
uses: 8398a7/action-slack@28ba43ae48961b90635b50953d216767a6bea486 #using https://github.com/8398a7/action-slack/releases/tag/v3.16.2
with:
status: ${{ job.status }}
fields: repo,action,workflow
text: 'AsyncAPI docs generation workflow failed'
author_name: asyncapi-bot
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_CI_FAIL_NOTIFY }}