Adding customer stories under the "Why Cloud.gov section" #763
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Link Checker Workflow | |
on: | |
pull_request: | |
jobs: | |
link-checker: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 2 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- uses: actions/setup-node@v3 | |
with: | |
node-version-file: .nvmrc | |
- name: Install Dependencies | |
run: npm install | |
- name: Get changed files | |
id: changed-files | |
uses: tj-actions/changed-files@v19 | |
with: | |
base_sha: ${{ github.event.pull_request.base.sha }} | |
sha: ${{ github.event.pull_request.head.sha }} | |
separator: '\n' | |
- name: Wait on federalist build | |
id: wait-federalist-build | |
if: steps.changed-files.outputs.added_files != '' | |
uses: cloud-gov/wait-federalist-build-action@main | |
with: | |
debug: true | |
commit-sha: ${{ github.event.pull_request.head.sha }} | |
- name: Build website using branch-specific configuration | |
if: steps.changed-files.outputs.added_files != '' | |
run: | | |
PREVIEW_URL=${{ steps.wait-federalist-build.outputs.preview-url }} | |
# strip trailing slash to make link checking work properly | |
echo "url: ${PREVIEW_URL%/}" >> _config.yml | |
sed -i -e "/github_branch/d" _config.yml | |
echo "github_branch: ${{ github.event.pull_request.head.ref }}" >> _config.yml | |
npm run build | |
- name: Build website with normal configuration | |
if: steps.changed-files.outputs.added_files == '' | |
run: npm run build | |
- name: Link Checker | |
uses: lycheeverse/[email protected] | |
with: | |
args: --github-token ${{secrets.GITHUB_TOKEN}} --max-concurrency 64 --verbose --no-progress './*.md' './_site/**/*.html' | |
fail: true | |
env: | |
GITHUB_TOKEN: ${{secrets.GITHUB_TOKEN}} |