Skip to content

chore(deps): update denoland/setup-deno action to v1.5.1 (#51) #15

chore(deps): update denoland/setup-deno action to v1.5.1 (#51)

chore(deps): update denoland/setup-deno action to v1.5.1 (#51) #15

Workflow file for this run

name: Generate docs from pod
on:
push:
branches:
- main
jobs:
path-filter:
timeout-minutes: 30
outputs:
pod: ${{steps.changes.outputs.pod}}
runs-on: ubuntu-latest
permissions: {}
steps:
- name: checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2
id: changes
with:
filters: |
pod:
- README.pod
- .github/workflows/doc.yml
generate-document:
needs: path-filter
if: needs.path-filter.outputs.pod == 'true'
runs-on: ubuntu-latest
timeout-minutes: 30
permissions:
contents: write
pull-requests: write
steps:
- name: checkout
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
- uses: aquaproj/aqua-installer@6ce1f8848ec8e61f14d57bd5d7597057a6dd187c # v3.0.1
with:
aqua_version: v2.28.1
- name: Check is main protected
id: branch-check
env:
GH_TOKEN: ${{ github.token }}
run: |
PROTECTED=$(gh api "/repos/{owner}/{repo}/branches/main" | jq -r '.protected')
echo "isProtected=${PROTECTED}" | tee "${GITHUB_OUTPUT}"
- uses: Omochice/action-normalize-vim-plugin-name@4c0461629dd9dfbce8a5e77ef962d8d719ca1885 # v0.1.0
id: normalize
with:
trim-tail-dot-vim: true
- uses: Omochice/action-podeno@5545680f3c7e30f10aa025f2de63bffd90764623 # v0.1.0
with:
config: |
[
{ type: "markdown", in: "README.pod", out: "README.md", },
{ type: "vimdoc", in: "README.pod", out: "doc/${{ steps.normalize.outputs.normalizedName }}.txt", },
]
- uses: denoland/setup-deno@5e01c016a857a4dbb5afe9d0f9733cd472cba985 # v1.5.1
- run: deno fmt README.md
- uses: DavidAnson/markdownlint-cli2-action@db43aef879112c3119a410d69f66701e0d530809 # v17.0.0
with:
fix: true
globs: "README.md"
- uses: actions/create-github-app-token@5d869da34e18e7287c1daad50e0b8ea0f506ce69 # v1.11.0
id: app-token
with:
app-id: ${{ secrets.PODENO_APP_ID }}
private-key: ${{ secrets.PODENO_PRIVATE_KEY }}
- name: Create auto commit
if: ${{ steps.branch-check.outputs.isProtected == 'false' }}
uses: stefanzweifel/git-auto-commit-action@8621497c8c39c72f3e2a999a26b4ca1b5058a842 # v5.0.1
with:
commit_message: "docs: update docs"
branch: ${{ github.head_ref }}
token: ${{ steps.app-token.outputs.token }}
- name: Create Pull Request
if: ${{ steps.branch-check.outputs.isProtected == 'true' }}
uses: peter-evans/create-pull-request@d121e62763d8cc35b5fb1710e887d6e69a52d3a4 # v7.0.2
with:
title: "docs: update docs"
body: |
This PR is created by [create-pull-request](https://github.com/peter-evans/create-pull-request).
The docs are generated automaticaly.
author: "GitHub <noreply@github.com>"
delete-branch: true
token: ${{ steps.app-token.outputs.token }}