-
-
Notifications
You must be signed in to change notification settings - Fork 20
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add nightly link checks #686
Merged
Merged
Changes from 3 commits
Commits
Show all changes
8 commits
Select commit
Hold shift + click to select a range
1ada6a2
Add nighlty link checks per #366
mrjones-plip 97f624b
Merge main to branch
mrjones-plip e5b98ee
test schedule
mrjones-plip 367f835
comment out schedule for now, switch master -> main
mrjones-plip 39f0f5d
switch master -> main x2
mrjones-plip 7a25983
second schedule test
mrjones-plip c00f4e8
third schedule test
mrjones-plip 2110cb4
switch over to real schedule
mrjones-plip File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
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,71 @@ | ||
# Notes: | ||
# - All software installed below is pinned so they don't get upgraded and break w/o us knowing why. | ||
# - If you bump one version up to latest, please bump them all so we stay current! | ||
# - Hugo builds the site twice: once for link checking and once minified for pushing live | ||
# - Bash script for muffet is intentionally stand alone so devs/content editors can easily run it locally | ||
|
||
on: | ||
schedule: | ||
# * is a special character in YAML so you have to quote this string | ||
# runs at 3:15am every day: | ||
# - cron: '15 3 * * *' | ||
# runs every 5 min | ||
- cron: '*/5 * * * *' | ||
|
||
name: Test site and push live if we're on Master | ||
jobs: | ||
BuildLinkCheckPushLive: | ||
name: | ||
runs-on: ubuntu-18.04 | ||
timeout-minutes: 15 | ||
steps: | ||
|
||
- name: All Branches - Git checkout, including recursive call for Docsy theme | ||
uses: actions/checkout@v2 | ||
with: | ||
submodules: recursive # Fetch the Docsy theme | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
|
||
- name: All Branches - Install hugo extended v0.71.1 | ||
uses: peaceiris/actions-hugo@v2 | ||
with: | ||
hugo-version: "0.71.1" | ||
extended: true | ||
|
||
- name: All Branches - Install Node 12.x | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
|
||
- name: All Branches - Install npm modules for Hugo | ||
run: npm install | ||
|
||
- name: All Branches - Install Go v1.18 | ||
uses: actions/setup-go@v2 | ||
with: | ||
go-version: '1.18' | ||
|
||
- name: All Branches - Install Muffet v1.5.7 | ||
run: GO111MODULE=on go install github.com/raviqqe/[email protected] | ||
|
||
# run in background so CI doesn't hang waiting for "ctrl + c". Sleep ensures server is ready in next step | ||
- name: All Branches - Serve Hugo site | ||
run: | | ||
hugo server& | ||
sleep 5 | ||
|
||
- name: All Branches - Run Muffet link checker | ||
shell: bash | ||
run: ./.github/scripts/muffet.sh | ||
|
||
- name: Master Branch Only - Report errors to Slack, if any | ||
if: ${{ github.ref == 'refs/heads/master' && failure() }} | ||
uses: rtCamp/[email protected] | ||
env: | ||
SLACK_WEBHOOK: '${{ secrets.SLACK_WEB_HOOK }}' | ||
SLACK_CHANNEL: '#cht-squad-docs' | ||
SLACK_COLOR: '#3278BD' | ||
SLACK_ICON: ":flappingphone:" | ||
SLACK_MESSAGE: 'Broken Links Found' | ||
SLACK_TITLE: CHT DOCS BAD LINKS | ||
SLACK_USERNAME: Medic-Bot |
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
main
, right?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
d'oh! fixed in 367f835 and 39f0f5d