Skip to content

chore(deps): update denoland/setup-deno action to v1.4.0 (#43) #7

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

chore(deps): update denoland/setup-deno action to v1.4.0 (#43) #7

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@916edb9a40fd86d1ff57b758807ebe57242f7407 # 1.4.0
- run: deno fmt README.md
- uses: DavidAnson/markdownlint-cli2-action@b4c9feab76d8025d1e83c653fa3990936df0e6c8 # v16.0.0
with:
fix: true
globs: "README.md"
- uses: actions/create-github-app-token@31c86eb3b33c9b601a1f60f98dcbfd1d70f379b4 # v1.10.3
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@c5a7806660adbe173f04e3e038b0ccdcd758773c # v6.1.0
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 }}