Skip to content

chore(main): release 5.16.1 (#4113) #46

chore(main): release 5.16.1 (#4113)

chore(main): release 5.16.1 (#4113) #46

Workflow file for this run

name: Update docs
on:
push:
paths:
- "**/*.tf"
- "**/*.md"
- ".github/workflows/update-docs.yml"
permissions:
contents: write
pull-requests: write
jobs:
docs:
name: Auto update terraform docs
runs-on: ubuntu-latest
steps:
- name: Checkout with GITHUB Action token
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
with:
token: ${{ secrets.GITHUB_TOKEN }}
# use an app to ensure CI is triggered
- name: Generate TF docs
if: github.repository_owner == 'philips-labs'
uses: terraform-docs/gh-actions@cca78c27ac9e2b6545debf2ecae9df930fd3461c # v1.2.2
with:
find-dir: .
git-commit-message: "docs: auto update terraform docs"
git-push: ${{ github.ref != 'refs/heads/main' || github.repository_owner != 'philips-labs' }}
git-push-user-name: philips-labs-pr|bot
git-push-user-email: "philips-labs-pr[bot]@users.noreply.github.com"
- name: Generate TF docs (forks)
if: github.repository_owner != 'philips-labs'
uses: terraform-docs/gh-actions@cca78c27ac9e2b6545debf2ecae9df930fd3461c # v1.2.2
with:
find-dir: .
git-commit-message: "docs: auto update terraform docs"
git-push: ${{ github.ref != 'refs/heads/main' || github.repository_owner != 'philips-labs' }}
# change docs via PR in case of locked main branch
- name: Create Pull Request (main branch only)
if: github.ref == 'refs/heads/main' && github.repository_owner == 'philips-labs'
uses: peter-evans/create-pull-request@6cd32fd93684475c31847837f87bb135d40a2b79 # v7.0.3
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: "docs: auto update terraform docs"
title: "docs: Update Terraform docs"
branch: update-docs
branch-suffix: random
base: ${{ github.event.pull_request.base.ref }}
delete-branch: true
deploy-pages:
needs: [docs]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- name: Configure Git Credentials
run: |
git config user.name github-actions[bot]
git config --global user.email "github-actions[bot]@users.noreply.github.com"
- uses: actions/setup-python@f677139bbe7f9c59b41e40162b753c062f5d49a3 # v5.2.0
with:
python-version: 3.x
- run: echo "cache_id=$(date --utc '+%V')" >> $GITHUB_ENV
- uses: actions/cache@0c45773b623bea8c8e75f6c82b208c3cf94ea4f9 # v4.0.2
with:
key: mkdocs-material-${{ env.cache_id }}
path: .cache
restore-keys: |
mkdocs-material-
- run: pip install mkdocs-material
- run: pip install mkdocs-material-extensions
- run: mkdocs gh-deploy --force -c -b gh-pages