mirror of
https://github.com/XRPLF/xrpl-dev-portal.git
synced 2025-11-19 11:15:49 +00:00
CI: better link checker
This commit is contained in:
@@ -1,33 +1,26 @@
|
||||
name: Link Checker
|
||||
name: Link Checker (PR Build)
|
||||
|
||||
on:
|
||||
push:
|
||||
env:
|
||||
IS_PR: false
|
||||
pull_request:
|
||||
env:
|
||||
IS_PR: true
|
||||
types: [opened, edited, synchronize]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
|
||||
name: "Build and Check Links"
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
max-parallel: 4
|
||||
matrix:
|
||||
python-version: [3.7]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v1
|
||||
- uses: actions/checkout@v2
|
||||
- name: Set up Python ${{ matrix.python-version }}
|
||||
uses: actions/setup-python@v1
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
python-version: "3.7"
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
python -m pip install --upgrade pip
|
||||
pip install dactyl
|
||||
pip install Jinja2==2.11.3
|
||||
pip install dactyl lxml
|
||||
|
||||
- name: Check for Conflict Markers
|
||||
run: |
|
||||
@@ -35,9 +28,18 @@ jobs:
|
||||
|
||||
- name: Build docs
|
||||
run: |
|
||||
echo '{"github_forkurl": "https://github.com/'"${{ github.repository }}"'", "github_branch": "'"${{ github.head_ref }}"'", "github_pr_id": "'"${{ github.event.number }}"'", "is_pr_build": '"${{ IS_PR }}"'}' > dactyl_vars.json
|
||||
echo '{"github_forkurl": "https://github.com/'"${{ github.repository }}"'", "github_branch": "'"${{ github.head_ref }}"'", "github_pr_id": "'"${{ github.event.number }}"'", "is_pr_build": true}' > dactyl_vars.json
|
||||
tool/build_all_langs.sh --vars dactyl_vars.json
|
||||
|
||||
- name: Run Dactyl Link Checker
|
||||
id: checker
|
||||
run: |
|
||||
dactyl_link_checker -q
|
||||
dactyl_link_checker -q > linkreport.txt
|
||||
sed -i '1,/---------------------------------------/d' linkreport.txt
|
||||
echo "::set-output name=linkreport::$(cat linkreport.txt)"
|
||||
|
||||
- name: Comment Broken Links
|
||||
uses: unsplash/comment-on-pr@master
|
||||
with:
|
||||
msg: ${{steps.checker.outputs.linkreport}}
|
||||
check_for_duplicate_msg: false
|
||||
@@ -1,8 +1,9 @@
|
||||
name: "Dactyl build only on PR"
|
||||
name: "Preview PR builds in the gh-pages branch"
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
types: [opened, edited, synchronize]
|
||||
# Temporarily disabled: Requires permissions the ripple org doesn't allow
|
||||
# on:
|
||||
# pull_request:
|
||||
# types: [opened, edited, synchronize]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
Reference in New Issue
Block a user