| # Licensed to the Apache Software Foundation (ASF) under one or more |
| # license agreements; and to You under the Apache License, version 2.0: |
| # |
| # https://www.apache.org/licenses/LICENSE-2.0 |
| # |
| # This file is part of the Apache Pekko project, which was derived from Akka. |
| # |
| |
| name: Link Validator |
| |
| permissions: {} |
| |
| on: |
| workflow_dispatch: |
| schedule: |
| - cron: '0 6 * * 1' |
| |
| jobs: |
| validate-links: |
| runs-on: ubuntu-22.04 |
| if: github.repository == 'apache/pekko-grpc' |
| steps: |
| - name: Checkout |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 |
| with: |
| # See https://github.com/actions/checkout/issues/299#issuecomment-677674415 |
| ref: ${{ github.event.pull_request.head.sha }} |
| # fetch everything https://github.com/actions/checkout#fetch-all-history-for-all-tags-and-branches |
| fetch-depth: 0 |
| |
| - name: Setup Java 17 |
| uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5.2.0 |
| with: |
| distribution: temurin |
| java-version: 17 |
| |
| - name: Install sbt |
| uses: sbt/setup-sbt@af116cce31c00823d3903ce687f9cda3a4f19f1b # v1.2.1 |
| |
| - name: Cache Coursier cache |
| uses: coursier/cache-action@95e5b1029b6b86e7bac033ee44a0697d8a527d2d # v8.1.1 |
| |
| - name: Setup Coursier |
| uses: coursier/setup-action@fd1707a76b027efdfb66ca79318b4d29b72e5a02 # v3.0.0 |
| |
| - name: sbt site |
| run: sbt docs/makeSite |
| |
| - name: Run Link Validator |
| run: | |
| VERSION=$(ls docs/target/site/docs/pekko-grpc) |
| echo "Version is $VERSION" |
| sed -e "s/snapshot/$VERSION/" scripts/link-validator.conf > /tmp/link-validator.conf |
| cs launch net.runne::site-link-validator:0.2.5 -- /tmp/link-validator.conf |