Skip to content

pulumi-cli

pulumi-cli #226

Workflow file for this run

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/[email protected]
with:
repo: pulumi/pulumictl
- name: Install Pulumi CLI
uses: pulumi/[email protected]
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.111.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 ensure_tools
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 "pulumi"
working-directory: docs
- name: generate markdown
run: |
pulumi gen-markdown ./content/docs/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/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 "[email protected]"
git config --local user.name "pulumi-bot"
git checkout -b pulumi/${{ github.run_id }}-${{ github.run_number }}
git add static/
git add content/
git add data/
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:
- "16.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