forked from starknet-io/starknet.js
-
Notifications
You must be signed in to change notification settings - Fork 0
45 lines (44 loc) · 1.47 KB
/
manual-docs-version-pr.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
name: '[Manual] Documentation Version PR'
on:
workflow_dispatch:
inputs:
version-override:
description: 'Version override'
type: string
jobs:
build_docs:
name: Documentation build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: lts/*
cache: 'npm'
- name: Setup
run: |
npm ci --ignore-scripts
cd www/
npm ci --ignore-scripts
- name: Build
run: |
args=()
[[ "${{ inputs.version-override }}" != "" ]] && args+=( '--version-override=${{ inputs.version-override }}' )
[[ "${{ inputs.version-override }}" != "" ]] && args+=( '--git-revision-override=v${{ inputs.version-override }}' )
rm -rf www/docs/API/
npm run docs:build:version "${args[@]}"
npm run docs:version "${args[@]}"
npm run format
git add www/versioned_docs www/versioned_sidebars www/versions.json
git checkout .
- name: Create pull request
uses: peter-evans/create-pull-request@v6
with:
branch: ci/docs-version
committer: CI <[email protected]>
author: CI <[email protected]>
commit-message: 'docs: generate documentation version'
title: 'CI documentation version'
body: ''
delete-branch: true
reviewers: penovicp, ${{ github.triggering_actor }}