-
Notifications
You must be signed in to change notification settings - Fork 134
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
Create link-check.yml #1571
Merged
Merged
Create link-check.yml #1571
Changes from 1 commit
Commits
Show all changes
10 commits
Select commit
Hold shift + click to select a range
16a709b
Create link-check.yml
korbinib 6300970
Update .github/workflows/link-check.yml
korbinib 871c6e9
Update link-check.yml
korbinib 7defe32
Merge branch 'elixir-europe:master' into link-check
korbinib 19f6dc7
Merge pull request #2 from korbinib/link-check
korbinib 12a0650
Update link-check.yml
korbinib c12ca0a
Update link-check.yml
korbinib 969e0b9
Merge branch 'elixir-europe:master' into master
korbinib 9fcd07a
Merge pull request #3 from korbinib/master
korbinib d9e768d
Update link-check.yml
korbinib 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,71 @@ | ||
name: Link Checker | ||
|
||
on: | ||
repository_dispatch: | ||
workflow_dispatch: | ||
inputs: | ||
logLevel: | ||
description: 'Log level' | ||
required: true | ||
default: 'warning' | ||
type: choice | ||
options: | ||
- info | ||
- warning | ||
- debug | ||
|
||
schedule: | ||
- cron: "00 18 * * *" | ||
|
||
jobs: | ||
linkChecker: | ||
runs-on: ubuntu-latest | ||
permissions: | ||
issues: write | ||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
|
||
- name: Setup Ruby | ||
uses: ruby/setup-ruby@v1 | ||
with: | ||
ruby-version: '3.1' | ||
bundler-cache: true | ||
cache-version: 0 | ||
|
||
|
||
- name: Install dependencies | ||
run: | | ||
bundle install | ||
- name: Build with Jekyll | ||
# Outputs to the './_site' directory by default | ||
run: | | ||
bundle exec jekyll build | ||
env: | ||
PAGES_REPO_NWO: ${{ github.repository }} | ||
JEKYLL_BUILD_BRANCH: ${{ github.ref_name }} | ||
korbinib marked this conversation as resolved.
Show resolved
Hide resolved
|
||
JEKYLL_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Link Checker | ||
id: lychee | ||
uses: lycheeverse/lychee-action@v2 | ||
with: | ||
# Check all markdown, html and reStructuredText files in repo (default) | ||
args: _site/ --fallback-extensions .html | ||
# Don't fail action on broken links | ||
fail: false | ||
|
||
- name: Add page URL | ||
run: | | ||
DEPLOY_URL="https://rdmkit.elixir-europe.org/" && \ | ||
sed -i "s|\\#\\#\\# Errors in _site\/|\\#\\#\\# Errors in ${DEPLOY_URL}|g" ./lychee/out.md && \ | ||
cat ./lychee/out.md | ||
|
||
- name: Create Issue From File | ||
if: steps.lychee.outputs.exit_code != 0 | ||
uses: peter-evans/create-issue-from-file@v5 | ||
with: | ||
title: Link Checker Report | ||
content-filepath: ./lychee/out.md | ||
labels: bug, automated issue | ||
issue-number: 1570 |
Oops, something went wrong.
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.
Are these inputs needed? I think we can also remove repository dispatch
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.
no, will remove it.