Skip to main content
Using Deno in production at your company? Earn free Deno merch.
Give us feedback
Module

x/documentaly/action.yml

(Beta) Maintain document and build tool.
Go to Latest
File
name: documentalyauthor: mssknddescription: Check document maintenancebranding: icon: file-text color: orangeinputs: GITHUB_TOKEN: # description: 'ex. ${{ secrets.GITHUB_TOKEN }}' required: true BASE_BRANCH: description: 'Base branch name (default: main)' default: 'main' MARKDOWN_DIR: default: '.'runs: using: composite steps: - name: Checkout uses: actions/checkout@v2 - name: Setup deno uses: denoland/setup-deno@v1 with: deno-version: v1.x - name: install documentaly shell: bash run: deno install -A --name documentaly https://deno.land/x/documentaly/mod.ts - name: Fetch base branch shell: bash run: git fetch origin ${{ inputs.BASE_BRANCH }}:${{ inputs.BASE_BRANCH }} - name: Check to maintain documents # Give a list of modified files and markdowns. shell: bash run: > documentaly check $(git diff --name-only HEAD ${{ inputs.BASE_BRANCH }} | tr '\n' ' ') -m $(find ${{ inputs.MARKDOWN_DIR }} -name '*.md' | sed -e ':a' -e 'N' -e '$!ba' -e 's/\n/,/g' -e 's/,$//') >> ./dipendency.json - name: Generate comment body file shell: bash env: PR_HEAD_SHA: ${{github.event.pull_request.head.sha}} PR_HEAD_FULL_NAME: ${{github.event.pull_request.head.repo.full_name}} run: > documentaly comment -b ${PR_HEAD_FULL_NAME} -s ${PR_HEAD_SHA} -j "$( cat ./dipendency.json )" >> comment-body.txt - name: Make comment on pull request when this action was pull request event. env: GITHUB_TOKEN: ${{ inputs.GITHUB_TOKEN }} PR_NUMBER: ${{ github.event.pull_request.number }} shell: bash run: > if [ -n "${PR_NUMBER}" ]; then gh pr comment ${PR_NUMBER} -F ./comment-body.txt fi