1
0
mirror of synced 2025-12-22 11:26:57 -05:00

Merge branch 'use-linkinator-for-internal-link-check' of github.com:github/docs-internal into fix-broken-links-pages-versioning

This commit is contained in:
Sarah Schneider
2021-01-22 16:07:50 -05:00
7 changed files with 113 additions and 47 deletions

View File

@@ -38,6 +38,7 @@ jobs:
name: Install
run: npm ci
## TODO
# - if: ${{ github.repository == 'github/docs-internal' && needs.see_if_should_skip.outputs.should_skip != 'true' }}
# name: Clone early access
# run: npm run heroku-postbuild

Binary file not shown.

After

Width:  |  Height:  |  Size: 6.6 KiB

View File

@@ -58,7 +58,7 @@ jobs:
To use a preinstalled version of the .NET Core SDK on a {% data variables.product.prodname_dotcom %}-hosted runner, use the `setup-dotnet` action. This action finds a specific version of .NET from the tools cache on each runner, and adds the necessary binaries to `PATH`. These changes will persist for the remainder of the job.
The `setup-dotnet` action is the recommended way of using .NET with {% data variables.product.prodname_actions %}, because it ensures consistent behavior across different runners and different versions of .NET. If you are using a self-hosted runner, you must install .NET and add it to `PATH`. For more information, see the [`setup-dotnet`](https://github.com/marketplace/actions/setup-dotnet).
The `setup-dotnet` action is the recommended way of using .NET with {% data variables.product.prodname_actions %}, because it ensures consistent behavior across different runners and different versions of .NET. If you are using a self-hosted runner, you must install .NET and add it to `PATH`. For more information, see the [`setup-dotnet`](https://github.com/marketplace/actions/setup-net-core-sdk) action.
#### Using multiple .NET versions

View File

@@ -122,7 +122,6 @@ When you contact {% data variables.contact.enterprise_support %}, you can choose
### Further reading
{% if enterpriseServerVersions contains currentVersion %}
- [Frequently asked questions about {% data variables.product.prodname_ghe_server %}](https://enterprise.github.com/faq)
- Section 10 on Support in the "[{% data variables.product.prodname_ghe_server %} License Agreement](https://enterprise.github.com/license)"{% endif %}
- "[Receiving help from {% data variables.contact.github_support %}](/admin/enterprise-support/receiving-help-from-github-support)"{% if enterpriseServerVersions contains currentVersion %}
- "[Preparing to submit a ticket](/enterprise/admin/guides/enterprise-support/preparing-to-submit-a-ticket)"{% endif %}

View File

@@ -351,7 +351,7 @@ Signature of GitHub, Inc. appears below.
Signing the Standard Contractual Clauses, Appendix 1 and Appendix 2 on behalf of the data importer
![Screen Shot 2020-10-29 at 10 21 08 AM](https://user-images.githubusercontent.com/42984983/97613325-c93eda00-19d5-11eb-82e8-563267d1d738.png)
![Lynn Hashimoto](/assets/images/lynn_hashimoto.png)
Lynn Hashimoto, Head of Product & Regulatory Legal

View File

@@ -71,9 +71,16 @@ This script is run automatically when you run the server locally. It checks whet
---
### [`check-internal-links.js`](check-internal-links.js)
This script runs in CI via GitHub Action to check all *internal* links in English content, not including deprecated Enterprise Server content. This is different from script/check-english-links.js, which checks *all* links in the site, both internal and external, and is much slower.
---
### [`check-s3-images.js`](check-s3-images.js)
Run this script in your branch to check whether any images referenced in content are not in an expected S3 bucket. You will need to authenticate to S3 via `awssume` to use this script.
Run this script in your branch to check whether any images referenced in content are not in an expected S3 bucket. You will need to authenticate to S3 via `awssume` to use this script. Instructions for the one-time setup are at docs-content/doc-team-workflows/workflow-information-for-all-writers/setting-up-awssume-and-s3cmd.md
---
@@ -89,6 +96,13 @@ Run this script in your branch to check whether any images referenced in content
---
### [`content-migrations/remove-html-comments-from-index-files.js`](content-migrations/remove-html-comments-from-index-files.js)
---
@@ -120,6 +134,41 @@ This script finds and lists all the Heroku staging apps and deletes any leftover
---
### [`early-access/clone-for-build.js`](early-access/clone-for-build.js)
This script is run as a postbuild script during staging and deployments on Heroku. It clones a branch in the early-access repo that matches the current branch in the docs repo; if one can't be found, it clones the `main` branch.
---
### [`early-access/clone-locally`](early-access/clone-locally)
This script is run on a writer's machine to begin developing Early Access content locally.
---
### [`early-access/create-branch`](early-access/create-branch)
This script is run on a writer's machine to create an Early Access branch that matches the current docs-internal branch.
---
### [`early-access/symlink-from-local-repo.js`](early-access/symlink-from-local-repo.js)
This script is run on a writer's machine while developing Early Access content locally. You must pass the script the location of your local copy of the `github/docs-early-access` git repo as the first argument.
---
### [`early-access/update-data-and-image-paths.js`](early-access/update-data-and-image-paths.js)
This script is run on a writer's machine while developing Early Access content locally. It updates the data and image paths to either include `early-access` or remove it.
---
### [`enterprise-server-deprecations/archive-version.js`](enterprise-server-deprecations/archive-version.js)
Run this script during the Enterprise deprecation process to download static copies of all pages for the oldest supported Enterprise version. See the Enterprise deprecation issue template for instructions.
@@ -193,6 +242,12 @@ Given: /github/getting-started-with-github/using-github Returns: /free-pro-team@
Given: /enterprise/admin/installation/upgrading-github-enterprise Returns: /enterprise-server@2.22/admin/installation/upgrading-github-enterprise
---
### [`graphql/build-changelog.js`](graphql/build-changelog.js)
---
@@ -316,6 +371,13 @@ Run this script to manually purge the Fastly cache for all language variants of
---
### [`purge-redis-pages.js`](purge-redis-pages.js)
Run this script to manually purge the Redis rendered page cache. This will typically only be run by Heroku during the deployment process, as triggered via our Procfile's "release" phase configuration.
---
### [`reconcile-category-dirs-with-ids.js`](reconcile-category-dirs-with-ids.js)
An automated test checks for discrepancies between category directory names and slugified category titles as IDs.
@@ -362,11 +424,11 @@ Examples:
reset a single translated file using a relative path: $ script/reset-translated-file.js translations/es-XL/content/actions/index.md
reset a single translated file using a full path: $ script/reset-translated-file.js /Users/z/git/github/docs/translations/es-XL/content/actions/index.md
reset a single translated file using a full path: $ script/reset-translated-file.js /Users/z/git/github/docs-internal/translations/es-XL/content/actions/index.md
reset all language variants of a single English file (using a relative path): $ script/reset-translated-file.js content/actions/index.md $ script/reset-translated-file.js data/ui.yml
reset all language variants of a single English file (using a full path): $ script/reset-translated-file.js /Users/z/git/github/docs/content/desktop/index.md $ script/reset-translated-file.js /Users/z/git/github/docs/data/ui.yml
reset all language variants of a single English file (using a full path): $ script/reset-translated-file.js /Users/z/git/github/docs-internal/content/desktop/index.md $ script/reset-translated-file.js /Users/z/git/github/docs-internal/data/ui.yml
---
@@ -422,14 +484,14 @@ Starts the local development server with all of the available languages enabled.
### [`standardize-frontmatter-order.js`](standardize-frontmatter-order.js)
Run this script to standardize frontmatter fields in all content files.
Run this script to standardize frontmatter fields in all content files, per the order: - title - intro - product callout - productVersion - map topic status - hidden status - layout - redirect
---
### [`sync-algolia-search-indices.js`](sync-algolia-search-indices.js)
### [`sync-search-indices.js`](sync-search-indices.js)
This script is run automatically via GitHub Actions on every push to `master` to generate searchable data and upload it to our Algolia account. It can also be run manually. For more info see [contributing/search.md](contributing/search.md)
This script is run automatically via GitHub Actions on every push to `main` to generate searchable data. It can also be run manually. For more info see [contributing/search.md](contributing/search.md)
---
@@ -443,15 +505,7 @@ List all the TODOs in our JavaScript files and stylesheets.
### [`update-enterprise-dates.js`](update-enterprise-dates.js)
Run this script during Enterprise releases and deprecations. It uses the GitHub API to get dates from `enterprise-releases` and updates `lib/enterprise-dates.json`. The help site uses this JSON to display dates at the top of some Enterprise versions.
This script requires that you have a GitHub Personal Access Token in a `.env` file. If you don't have a token, get one [here](https://github.com/settings/tokens/new?scopes=repo&description=docs-dev). If you don't have an `.env` file in your docs checkout, run this command in Terminal:
`cp .env.example .env`
Open the `.env` file in a text editor, and find the `GITHUB_TOKEN=` placeholder. Add your token after the equals sign.
Do not commit the `.env` file; just leave it in your checkout.
This script fetches data from https://github.com/github/enterprise-releases/blob/master/releases.json and updates `lib/enterprise-dates.json`, which the site uses for various functionality.
---
@@ -482,3 +536,5 @@ This script is used by other scripts to update temporary AWS credentials and aut
Use this script to upload individual or batched asset files to a versioned S3 bucket. Run `upload-images-to-s3.js --help` for usage details.
---

View File

@@ -4,8 +4,18 @@ const linkinator = require('linkinator')
const checker = new linkinator.LinkChecker()
const { deprecated } = require('../lib/enterprise-server-releases')
// [start-readme]
//
// This script runs in CI via GitHub Action to check all *internal* links in English content,
// not including deprecated Enterprise Server content. This is different from script/check-english-links.js,
// which checks *all* links in the site, both internal and external, and is much slower.
//
// [end-readme]
const config = {
path: 'http://localhost:4002/en',
// Use concurrency = 10 to optimize for Actions
// See https://github.com/JustinBeckwith/linkinator/issues/135#issuecomment-623240879
concurrency: 10,
recurse: true,
linksToSkip: [