diff --git a/.github/workflows/format_external_links.yml b/.github/workflows/format_external_links.yml new file mode 100644 index 00000000..f64ade64 --- /dev/null +++ b/.github/workflows/format_external_links.yml @@ -0,0 +1,33 @@ +name: Format Markdown Links + +on: + push: + branches-ignore: + # We don't want code modified after merge in master + - main + paths: + # Run action if any Markdown file is pushed + - '**.md' + +jobs: + format-links: + runs-on: ubuntu-latest + steps: + - name: Checkout Repository + uses: actions/checkout@v2 + + - name: Set up Python + uses: actions/setup-python@v2 + with: + python-version: '3.x' + + - name: Run Link Formatter Script + run: python ./scripts/format_external_links.py --path ./docs + + - name: Commit changes + uses: stefanzweifel/git-auto-commit-action@v4 + with: + commit_message: 'GitHub Action: Apply external link format' + branch: ${{ github.head_ref }} + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file