-
Notifications
You must be signed in to change notification settings - Fork 226
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add Github Action to check for broken site links (#1393)
* Add URL check for live site * Fix node structure. * Update linkcheck action ref. * Test servedocs in GHA. * Run servedocs in parallel * Fix broken catalog link. * Remove ampersand. * Change args param. * Lower wait time. * Add timer to building. * Temporarily remove site wait. * Use pub in ubuntu-latest. * Add dart setup. * Use pub executable path. * Extend site build time. * Switch to building manually. * Add working directory. * Remove unreal build command. * Change python path. * Move doc content to docs/kpt * Copy docs to new dir. * Copy to built site dire. * First pass of broken links. * Fix remaining 404s. * Fix 404s. * Regen docs. * Clean up GHA. * Avoid two redirects.
- Loading branch information
Showing
5 changed files
with
47 additions
and
5 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,42 @@ | ||
# Copyright 2021 Google LLC | ||
# | ||
# Licensed under the Apache License, Version 2.0 (the "License"); | ||
# you may not use this file except in compliance with the License. | ||
# You may obtain a copy of the License at | ||
# | ||
# http://www.apache.org/licenses/LICENSE-2.0 | ||
# | ||
# Unless required by applicable law or agreed to in writing, software | ||
# distributed under the License is distributed on an "AS IS" BASIS, | ||
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. | ||
# See the License for the specific language governing permissions and | ||
# limitations under the License. | ||
|
||
name: SiteCheck | ||
on: | ||
pull_request: | ||
branches: | ||
- master | ||
paths: | ||
- "site/**" | ||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: cedx/setup-dart@v2 | ||
- uses: actions/checkout@v2 | ||
- name: Build site | ||
run: | | ||
pub global activate linkcheck | ||
go run github.com/gohugoio/hugo | ||
working-directory: ./site | ||
- name: Copy site content | ||
run: | | ||
mkdir built-site && mkdir built-site/kpt | ||
cd docs | ||
cp -r . ../built-site/kpt | ||
- name: Crawl site | ||
run: | | ||
python -m SimpleHTTPServer 1313 & sleep 5s | ||
$HOME/.pub-cache/bin/linkcheck localhost:1313/kpt | ||
working-directory: ./built-site |
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
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
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
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