Skip to content

v4.4.0

v4.4.0 #68

Workflow file for this run

name: Update api docs
on:
push:
branches:
- docs
release:
types: [published]
workflow_dispatch:
inputs:
path:
description: 'Destination path to generate'
required: false
jobs:
build:
name: Update api docs
runs-on: ubuntu-latest
steps:
- uses: actions/setup-node@v4
- run: npm install -g npm@latest
continue-on-error: true
- uses: actions/checkout@v4
with:
path: source
- uses: actions/checkout@v4
with:
ref: gh-pages
path: yeoman-environment-doc
- uses: actions/cache@v4
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-gh-pages
${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}-
- run: npm ci
working-directory: source
- run: npm config set yeoman-environment:doc_path ../yeoman-environment-doc/${{ github.event.inputs.path }}
working-directory: source
- run: npm run doc
working-directory: source
- name: Create commit
working-directory: yeoman-environment-doc
if: always()
run: |
git add .
git config --local user.email ""
git config --local user.name "Github Actions"
git commit -a -m "Update api for ${{github.event.release.name}}" || true
- name: Create Pull Request
if: always()
id: cpr
uses: peter-evans/create-pull-request@v6.0.1
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: 'Update api for ${{github.event.release.name}}'
title: 'Update api for ${{github.event.release.name}}'
body: |
Update api docs
labels: automated pr
branch: gh-pages-master
path: yeoman-environment-doc
- name: Check outputs
run: |
echo "Pull Request Number - ${{ env.PULL_REQUEST_NUMBER }}"
echo "Pull Request Number - ${{ steps.cpr.outputs.pr_number }}"