Skip to content

create gh action

create gh action #3

Workflow file for this run

name: "Look for broken links to documentation"
on:
pull_request:
types: [opened, synchronize]
# schedule:
# # Every day at 00:00 UTC
# - cron: '0 0 * * *'
jobs:
run-docs-test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Run the docs test
run: false
- name: Create PR if test failed
if: failure()
env:
PR_TITLE: "Fix broken documentation links"
PR_BODY: "Some links to the documentation are broken.\nSee: {{ github.server_url }}/{{ github.repository }}/actions/runs/{{ github.run_id }}"
PR_BRANCH: "fix-broken-docs-links-{{ github.run_id }}"
run: |
git switch -c ${{ env.PR_BRANCH }}
git push
gh pr create \
--draft \
--title "${{ env.PR_TITLE }}" \
--body "${{ env.PR_BODY }}" \
--base master \
--head "${{ env.PR_BRANCH }}" \
--label "ch: frontend"