-
Notifications
You must be signed in to change notification settings - Fork 0
73 lines (60 loc) · 2.03 KB
/
docs.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
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
name: Generate and Publish CLI Docs
on:
release:
types: [published]
workflow_dispatch:
permissions:
contents: write
pull-requests: write
jobs:
generate-and-publish:
runs-on: ubuntu-latest
env:
TAG_NAME: ${{ github.event.release.tag_name || 'edge' }}
steps:
- name: Checkout Repository
uses: actions/checkout@v4
with:
path: pops
- name: Checkout Docs Repository
uses: actions/checkout@v4
with:
repository: prompt-ops/docs
path: docs
- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: 1.22
cache: false
- name: Install dependencies
run: go mod tidy
working-directory: pops
- name: Generate CLI Docs
run: |
mkdir -p release/docs
make generate-cli-docs OUTPUT_PATH=release/docs/
working-directory: pops
- name: Copy Generated Docs
run: |
mkdir -p docs/content/en/cli
cp -R pops/release/docs/* docs/content/en/cli/
- name: Create Pull Request
uses: peter-evans/create-pull-request@v7
with:
token: ${{ secrets.POPS_GITHUB_OPS_PAT }}
path: docs
committer: pops-ci-bot <pops-ci-bot@users.noreply.github.com>
author: pops-ci-bot <pops-ci-bot@users.noreply.github.com>
signoff: true
commit-message: Update CLI documentation for ${{ env.TAG_NAME }}
title: "📄 Update CLI Documentation for ${{ env.TAG_NAME }}"
body: |
This PR updates the CLI documentation to reflect the changes in `${{ env.TAG_NAME }}`.
### Changes
- Updated CLI commands and usage examples.
- Added new features introduced in this release.
### How to Test
- Verify the generated documentation in the [docs repository](https://github.com/prompt-ops/docs).
base: main
branch: automated-docs-update/patch-${{ github.sha }}
delete-branch: true