-
Notifications
You must be signed in to change notification settings - Fork 221
143 lines (142 loc) · 4.85 KB
/
pulumi-cli.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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
name: cli docs build
on:
repository_dispatch:
types:
- pulumi-cli
jobs:
pull-request:
runs-on: ubuntu-latest
needs: build-pulumi-cli-docs
steps:
- name: checkout docs repo
uses: actions/checkout@v2
- name: set the pulumi version
run: |
echo "PULUMI_VERSION=${{ github.event.client_payload.ref }}" >> $GITHUB_ENV
- name: pull-request
uses: repo-sync/pull-request@v2
with:
source_branch: "pulumi/${{ github.run_id }}-${{ github.run_number }}"
destination_branch: "master"
pr_title: "Regen docs pulumi@${{ env.PULUMI_VERSION }}"
pr_body: "Automated PR"
pr_label: "automation/pulumi-cli-docs,automation/merge"
github_token: ${{ secrets.PULUMI_BOT_TOKEN }}
build-pulumi-cli-docs:
runs-on: ubuntu-latest
steps:
- name: set the pulumi version
run: |
echo "PULUMI_VERSION=${{ github.event.client_payload.ref }}" >> $GITHUB_ENV
- name: checkout docs repo
uses: actions/checkout@v2
with:
path: docs
- name: checkout pulumi repo
uses: actions/checkout@v2
with:
repository: pulumi/pulumi
path: pulumi
ref: v${{ github.event.client_payload.ref }}
- name: Install pulumictl
uses: jaxxstorm/action-install-gh-release@v1.1.0
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/action-install-pulumi-cli@v1.0.1
with:
pulumi-version: ${{ env.PULUMI_VERSION }}
- name: Install go
uses: actions/setup-go@v2
with:
go-version: ${{ matrix.goversion }}
- name: Install Hugo
uses: peaceiris/actions-hugo@v2
with:
hugo-version: '0.135.0'
extended: true
- name: Install node
uses: actions/setup-node@v2
with:
node-version: ${{matrix.nodeversion}}
- name: Install python
uses: actions/setup-python@v2
with:
python-version: ${{matrix.pythonversion}}
- name: Install Pipenv
run: pip3 install pipenv==2022.10.12
- name: Install dotnet
uses: actions/setup-dotnet@v1
with:
dotnet-version: ${{matrix.dotnetverson}}
- run: make ensure
working-directory: docs
- name: run yarn install in nodejs sdk
run: yarn install && yarn run tsc
working-directory: pulumi/sdk/nodejs
- name: run typedoc
run: PKGS=pulumi NOBUILD=true ./scripts/run_typedoc.sh
working-directory: docs
- name: generate python docs
run: ./scripts/generate_python_docs.sh
working-directory: docs
- name: generate markdown
run: |
pulumi gen-markdown ./content/docs/iac/cli/commands
working-directory: docs
- name: Update latest version
run: |
echo -n "${{ env.PULUMI_VERSION }}" > ./static/latest-version
working-directory: docs
- name: Update versions
run: node scripts/get-versions.js
env:
GITHUB_TOKEN: ${{ secrets.PULUMI_BOT_TOKEN }}
working-directory: docs
- name: Update version lists
run: |
NL=$'\n'
sed -e "s/<tbody>/<tbody>\\${NL} {{< changelog-table-row version=\"${{ env.PULUMI_VERSION}}\" date=\"$(date +%Y-%m-%d)\" showChecksum=\"true\" >}}/" -i ./content/docs/iac/download-install/versions.md
working-directory: docs
- name: git status
run: git status && git diff
working-directory: docs
- name: commit changes
run: |
git config --local user.email "bot@pulumi.com"
git config --local user.name "pulumi-bot"
git checkout -b pulumi/${{ github.run_id }}-${{ github.run_number }}
git add content/
git add data/
git add static-prebuilt/
git add static/
git commit -m "Regenerating docs for Pulumi@${{ env.PULUMI_VERSION}}"
git push origin pulumi/${{ github.run_id }}-${{ github.run_number }}
working-directory: docs
strategy:
matrix:
dotnetversion:
- 3.1.301
goversion:
- 1.16.x
pythonversion:
- "3.7"
nodeversion:
- "18.x"
notify:
if: failure()
name: Send slack notification
runs-on: ubuntu-latest
needs: [pull-request, build-pulumi-cli-docs]
steps:
- name: Slack Notification
uses: docker://sholung/action-slack-notify:v2.3.0
env:
SLACK_CHANNEL: docs-ops
SLACK_COLOR: "#F54242"
SLACK_MESSAGE: "cli docs build failure in pulumi/docs repo :meow_sad:"
SLACK_USERNAME: docsbot
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK_URL }}
SLACK_ICON: https://www.pulumi.com/logos/brand/avatar-on-white.png