diff --git a/.github/workflows/link-checker.yml b/.github/workflows/link-checker-pr.yml similarity index 51% rename from .github/workflows/link-checker.yml rename to .github/workflows/link-checker-pr.yml index ae77b18fcc..94f0876bf2 100644 --- a/.github/workflows/link-checker.yml +++ b/.github/workflows/link-checker-pr.yml @@ -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 diff --git a/.github/workflows/dactyl.yaml b/.github/workflows/pr-preview.yaml similarity index 91% rename from .github/workflows/dactyl.yaml rename to .github/workflows/pr-preview.yaml index 15137c2893..070328e527 100644 --- a/.github/workflows/dactyl.yaml +++ b/.github/workflows/pr-preview.yaml @@ -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: