Skip to content
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

repo sync #1240

Merged
merged 9 commits into from
Nov 10, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 4 additions & 8 deletions .github/workflows/check-all-english-links.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
name: Check all English links

on:
workflow_dispatch:
schedule:
- cron: "40 19 * * *" # once a day at 19:40 UTC / 11:40 PST

Expand All @@ -10,21 +11,16 @@ jobs:
if: github.repository == 'github/docs-internal'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
- name: npm ci
run: npm ci
- name: npm run build
run: npm run build
- name: Run script
run: script/check-external-links en > broken_links.md
run: script/check-english-links.js > broken_links.md
- name: Check if any broken links
id: check
run: |
if [ "$(grep 'All links are good' broken_links.md)" ]; then
if [ "$(grep '0 broken links found' broken_links.md)" ]; then
echo ::set-output name=continue::no
else
echo "::set-output name=continue::yes"
echo "::set-output name=title::$(grep 'found on help.github.com' broken_links.md)"
echo "::set-output name=title::$(head -1 broken_links.md)"
fi
- if: ${{ steps.check.outputs.continue == 'yes' }}
name: Create issue from file
Expand Down
8 changes: 3 additions & 5 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,6 @@
node_modules
npm-debug.log
coverage

# blc: broken link checker
blc_output.log
blc_output_internal.log
dist
.linkinator
broken_links.md
dist
7 changes: 6 additions & 1 deletion content/actions/index.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,14 +7,19 @@ introLinks:
reference: /actions/reference
featuredLinks:
guides:
- /actions/guides/setting-up-continuous-integration-using-workflow-templates
- /actions/learn-github-actions
- /actions/guides/about-continuous-integration
- /actions/guides/about-packaging-with-github-actions
gettingStarted:
- /actions/managing-workflow-runs
- /actions/hosting-your-own-runners
popular:
- /actions/reference/workflow-syntax-for-github-actions
- /actions/reference/events-that-trigger-workflows
- /actions/learn-github-actions
- /actions/reference/context-and-expression-syntax-for-github-actions
- /actions/reference/workflow-commands-for-github-actions
- /actions/reference/environment-variables
changelog:
- title: Self-Hosted Runner Group Access Changes
date: '2020-10-16'
Expand Down
36 changes: 23 additions & 13 deletions layouts/product-landing.html
Original file line number Diff line number Diff line change
Expand Up @@ -28,41 +28,51 @@ <h1 class="mb-3 font-mktg">{{ page.shortTitle }}</h1>
<!-- Article links -->
<div class="d-lg-flex gutter my-6 py-6">
<div class="col-12 col-lg-4 mb-4 mb-lg-0">
<div class="featured-links-heading pb-3 mb-4 border-bottom">
<h3 class="f5 text-normal text-mono text-uppercase color-gray-5">{% data ui.toc.guides %}</h3>
<div class="featured-links-heading mb-4 d-flex flex-items-baseline">
<h3 class="f4 text-normal text-mono text-uppercase color-gray-5">{% data ui.toc.guides %}</h3>
<a href="/{{ currentPath }}/guides" class="ml-4">View all {% octicon "arrow-right" height="14" class="v-align-middle" %}</a>
</div>
<ul class="list-style-none">
{% for link in featuredLinks.guides %}
<li class="Box px-3 py-1 mb-2">
{% include featured-link %}
<li class="border-top">
<a class="link-with-intro Bump-link--hover no-underline d-block py-4" href="{{ link.href }}">
<h4 class="link-with-intro-title link-gray-dark mb-1">{{ link.title }}<span class="Bump-link-symbol">→</span></h4>
<p class="link-with-intro-intro color-gray-5 mb-0">{{ link.intro | truncatewords: 12 }}</p>
</a>
</li>
{% endfor %}
</ul>
</div>

<div class="col-12 col-lg-4 mb-4 mb-lg-0">
<div class="featured-links-heading pb-3 mb-4 border-bottom">
<h3 class="f5 text-normal text-mono text-uppercase color-gray-5">{% data ui.toc.popular_articles %}</h3>
<div class="featured-links-heading mb-4 d-flex flex-items-baseline">
<h3 class="f4 text-normal text-mono text-uppercase color-gray-5">{% data ui.toc.popular_articles %}</h3>
</div>
<ul class="list-style-none">
{% for link in featuredLinks.popular %}
<li class="Box px-3 py-1 mb-2">
{% include featured-link %}
<li class="border-top">
<a class="link-with-intro Bump-link--hover no-underline d-block py-3" href="{{ link.href }}">
<h4 class="link-with-intro-title link-gray-dark">{{ link.title }}<span class="Bump-link-symbol">→</span></h4>
</a>
</li>
{% endfor %}
</ul>
</div>

<div class="col-12 col-lg-4 mb-4 mb-lg-0">
<div class="featured-links-heading pb-3 mb-4 border-bottom">
<h3 class="f5 text-normal text-mono text-uppercase color-gray-5">{% data ui.toc.whats_new %}</h3>
<div class="featured-links-heading mb-4 d-flex flex-items-baseline">
<h3 class="f4 text-normal text-mono text-uppercase color-gray-5">{% data ui.toc.whats_new %}</h3>
<a href="https://github.blog/changelog/" class="ml-4">View all {% octicon "arrow-right" height="14" class="v-align-middle" %}</a>
</div>
<ul class="list-style-none">
{% for link in page.changelog %}
<li class="mb-2">
<a href="{{ link.href }}" class="Box text-gray-dark Bump-link--hover p-3 d-flex flex-justify-between flex-items-center no-underline">
<li class="border-top">
<a href="{{ link.href }}" class="d-block text-gray-dark Bump-link--hover py-3 no-underline">
<time
class="tooltipped tooltipped-n text-gray-light text-mono mb-1"
aria-label="{{ link.date | date: '%B %d, %Y' }}"
>{{ link.date | date: "%B %d" }}</time>
<h4>{{ link.title }} <span class="Bump-link-symbol">→</span></h4>
<span class="text-gray-light text-mono ml-2" style="white-space: nowrap">{{ link.date | date: "%B %d, %Y" }}</span>
</a>
</li>
{% endfor %}
Expand Down
30 changes: 11 additions & 19 deletions lib/excluded-links.js
Original file line number Diff line number Diff line change
@@ -1,28 +1,20 @@
// Linkinator treats the following as regex.
module.exports = [
// GitHub search links fail with "429 Too Many Requests"
'https://github.com/search?*',
// Skip GitHub search links.
'https://github.com/search?.*',
'https://github.com/github/gitignore/search?',

// LinkedIn links fail due to bug: https://github.com/stevenvachon/broken-link-checker/issues/91
'https://www.linkedin.com/*',

// blc returns "BLC_UNKNOWN" on this link, even though cURL returns "302 Found"
'https://www.ilo.org/dyn/normlex/en/f?p=NORMLEXPUB:12100:0::NO::P12100_ILO_CODE:P029',

// the codercat link works but blc reports a false 404
'https://github.com/Codertocat/hello-world-npm/packages/10696?version=1.0.1',

// this URL started returning 403 to blc and cURL even though it works in a browser; see docs-internal #10124
'https://haveibeenpwned.com/',
'https://haveibeenpwned.com/*',

// this is a private repo customers are given access to when they purchase Insights; see docs-internal #12037
// These links require auth.
'https://github.com/settings/profile',
'https://github.com/github/docs/edit',
'https://github.com/github/insights-releases/releases/latest',

// developer content uses these for examples; they should not be checked
'http://localhost:1234/*',
// Developer content uses these for examples; they should not be checked.
'http://localhost:1234',
'localhost:3000',

// this URL works but blc reports a false 404
// Oneoff links that link checkers think are broken but are not.
'https://haveibeenpwned.com/',
'https://www.ilo.org/dyn/normlex/en/f?p=NORMLEXPUB:12100:0::NO::P12100_ILO_CODE:P029',
'http://www.w3.org/wiki/LinkHeader/'
]
Loading