Skip to content

Commit a2d66bb

Browse files
authored
Merge branch 'main' into patch-2
2 parents d910820 + efc4195 commit a2d66bb

File tree

1,653 files changed

+38815
-37661
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

1,653 files changed

+38815
-37661
lines changed

.github/actions-scripts/enterprise-server-issue-templates/deprecation-issue.md

Lines changed: 16 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,11 @@ The day after a GHES version's [deprecation date](https://github.com/github/docs
1515

1616
- [ ] In your checkout of the [repo with archived GHES content](https://github.com/github/help-docs-archived-enterprise-versions), create a new branch: `git checkout -b deprecate-<version>`
1717
- [ ] In your `docs-internal` checkout, download the static files for the oldest supported version into your archival checkout:
18+
The archive script depends on an optional dependency so install optional dependencies first:
19+
```
20+
$ npm ci --include-optional
21+
```
22+
Then run the archive script:
1823
```
1924
$ script/enterprise-server-deprecations/archive-version.js -p <path-to-archive-repo-checkout>
2025
```
@@ -26,52 +31,50 @@ The day after a GHES version's [deprecation date](https://github.com/github/docs
2631
2732
## Step 2: Upload the assets directory to Azure storage
2833
29-
- [ ] Log in to the Azure portal from Okta. Navigate to the [githubdocs Azure Storage Blob resoruce](https://portal.azure.com/#@githubazure.onmicrosoft.com/resource/subscriptions/fa6134a7-f27e-4972-8e9f-0cedffa328f1/resourceGroups/docs-production/providers/Microsoft.Storage/storageAccounts/githubdocs/overview).
34+
- [ ] Log in to the Azure portal from Okta. Navigate to the [githubdocs Azure Storage Blob resource](https://portal.azure.com/#@githubazure.onmicrosoft.com/resource/subscriptions/fa6134a7-f27e-4972-8e9f-0cedffa328f1/resourceGroups/docs-production/providers/Microsoft.Storage/storageAccounts/githubdocs/overview).
3035
- [ ] Click the "Open in Explorer" button to the right of search box.If you haven't already, click the download link to download "Microsoft Azure Storage Explorer." To login to the app, click the plug icon in the left sidebar and click the option to "add an azure account." When you login, you'll need a yubikey to authenticate through Okta.
3136
- [ ] From the Microsoft Azure Storage Explorer app, select the `githubdocs` storage account resource and navigate to the `github-images` blob container.
3237
- [ ] Click "Upload" and select "Upload folder." Click the "Selected folder" input to navigate to the `help-docs-archived-enterprise-versions` repository and select the `assets` directory for the version you just generated. In the "Destination folder" input, add the version number. For example, `/enterprise/2.22/`.
3338
- [ ] Check the log to ensure all files were uploaded successfully.
34-
- [ ] Removed the `assets` directory from the `/help-docsc-archived-enterprise-versions` repository.
39+
- [ ] Remove the `assets` directory from your `help-docsc-archived-enterprise-versions` repository, we don't want to commit that directory in the next step.
3540
3641
## Step 3: Commit and push changes to help-docs-archived-enterprise-versions repo
3742
38-
- [ ] Search for `site-search-input` in the compressed Javascript files. When you find it, use something like https://beautifier.io/ to reformat it to be readable. Find `site-search-input` in the file, there will be something like... `1125: function () { return [SearchReactComponent] },` Delete the innards of this function, but leave the `function() {}` part.
43+
- [ ] Search for `site-search-input` in the compressed Javascript files (should find the file in the `_next` directory). When you find it, use something like https://beautifier.io/ to reformat it to be readable. Find `site-search-input` in the file, the result will be enclosed in a function that looks something like... `1125: function () { ... },` Delete the innards of this function, but leave the `function() {}` part.
44+
- [ ] Copy, paste, and save the updated file back into your local `help-docs-archived-enterprise-versions` repository.
3945
- [ ] In your archival checkout, `git add <version>`, commit, and push.
4046
- [ ] Open a PR and merge it in. Note that the version will _not_ be deprecated on the docs site until you do the next step.
4147
4248
## Step 4: Deprecate the version in docs-internal
4349
4450
In your `docs-internal` checkout:
4551
- [ ] Create a new branch: `git checkout -b deprecate-<version>`.
46-
- [ ] Edit `lib/enterprise-server-releases.js` by moving the number to be deprecated into the `deprecated` array.
52+
- [ ] Edit `lib/enterprise-server-releases.js` by removing the version number to be deprecated from the `supported` array and move it to the `deprecated` array.
4753
- [ ] Open a new PR. Make sure to check the following:
48-
- [ ] Tests are passing.
49-
- [ ] The deprecated version renders on staging as expected. You should be able to navigate to docs.github.com/enterprise/<DEPRECATED VERSION> to access the docs. You should also be able to navigate to a page that is available in the deprecated version and change the version in the URL to the deprecated version, to test redirects.
54+
- [ ] Tests are passing (you may need to include the changes in step 6 to get tests to pass).
55+
- [ ] The deprecated version renders in preview as expected. You should be able to navigate to `docs.github.com/enterprise/<DEPRECATED VERSION>` to access the docs. You should also be able to navigate to a page that is available in the deprecated version and change the version in the URL to the deprecated version, to test redirects.
5056
- [ ] The new oldest supported version renders on staging as expected. You should see a banner on the top of every page for the oldest supported version that notes when the version will be deprecated.
5157
52-
You may need to include the changes in step 6 to get tests to pass.
53-
5458
## Step 5: Remove static files for the version
5559
56-
- [ ] In your `docs-internal` checkout, from your `remove-<version>-static-files` branch: `git checkout -b remove-<version>-static-files`
60+
- [ ] In your `docs-internal` checkout, create a new branch `remove-<version>-static-files` branch: `git checkout -b remove-<version>-static-files` (you can branch off of `main` or from your `deprecate-<version>` branch, up to you).
5761
- [ ] Run `script/enterprise-server-deprecations/remove-static-files.js` and commit results.
5862
- [ ] Run `script/enterprise-server-deprecations/remove-redirects.js` and commit results.
59-
- [ ] `lib/rest/static` directory has deferenced and decorated directory underneath, remove the numbered version and all below from the list
6063
- [ ] Open a new PR.
6164
- [ ] Get a review from docs-engineering and merge. This step can be merged independently from step 6. The purpose of splitting up steps 5 and 6 is to focus the review on specific files.
6265
6366
## Step 6: Remove the liquid conditionals and content for the version
6467
65-
- [ ] In your `docs-internal` checkout, from your `remove-<version>-markup` branch: `git checkout -b remove-<version>-markup`
68+
- [ ] In your `docs-internal` checkout, create a new branch `remove-<version>-markup` branch: `git checkout -b remove-<version>-markup` (you can branch off of `main` or from your `deprecate-<version>` branch, up to you).
6669
- [ ] Remove the outdated Liquid markup and frontmatter.
6770
- [ ] Run the script: `script/enterprise-server-deprecations/remove-version-markup.js --release <number>`.
6871
- [ ] Spot check a few changes. Content, frontmatter, and data files should all have been updated.
6972
- [ ] Open a PR with the results. The diff may be large and complex, so make sure to get a review from `@github/docs-content`.
70-
- [ ] Debug any test failures or unexpected results.
73+
- [ ] Debug any test failures or unexpected results -- it's very likely manual updates will be necessary, the script does a lot of work but doesn't automate everything and can't 100% replace human intent.
7174
- [ ] When the PR is approved, merge it in to complete the deprecation. This can be merged independently from step 5.
7275
7376
## Step 7: Deprecate the OpenAPI description in `github/github`
7477
7578
- [ ] In `github/github`, edit the release's config file in `app/api/description/config/releases/`, and change `deprecated: false` to `deprecated: true`.
7679
- [ ] Open a new PR, and get the required code owner approvals. A docs-content team member can approve it for the docs team.
77-
- [ ] When the PR is approved, merge the `github/github` PR.
80+
- [ ] When the PR is approved, [deploy the `github/github` PR](https://thehub.github.com/engineering/devops/deployment/deploying-dotcom/). If you haven't deployed a `github/github` PR before, work with someone that has -- the process isn't too involved depending on how you deploy, but there are a lot of details that can potentially be confusing as you can see from the documentation.

.github/workflows/prod-build-deploy-azure.yml renamed to .github/workflows/azure-prod-build-deploy.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Production (Azure) - Build and Deploy
1+
name: Azure Production - Build and Deploy
22

33
# **What it does**: Builds and deploys the default branch to production
44
# **Why we have it**: To enable us to deploy the latest to production whenever necessary rather than relying on PR merges.
@@ -21,10 +21,10 @@ concurrency:
2121
cancel-in-progress: false
2222

2323
jobs:
24-
build-and-deploy-prod-azure:
24+
azure-prod-build-and-deploy:
2525
if: ${{ github.repository == 'github/docs-internal' }}
2626
runs-on: ubuntu-latest
27-
timeout-minutes: 15
27+
timeout-minutes: 20
2828
environment:
2929
name: production
3030
url: 'https://docs.github.com'
43.9 KB
Loading
32.9 KB
Loading
18.7 KB
Loading
29 KB
Loading
38.4 KB
Loading
43.1 KB
Loading
36.3 KB
Loading

components/article/ClientSideHighlightJS.tsx

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,16 @@
11
import { useEffect } from 'react'
2+
import { useRouter } from 'next/router'
23
import hljs from 'highlight.js/lib/core'
34
import json from 'highlight.js/lib/languages/json'
5+
import javascript from 'highlight.js/lib/languages/javascript'
6+
import hljsCurl from 'highlightjs-curl'
47

58
// Add as needed. It's pretty cheap to add but please don't use
69
// highlight.js import that loads all and everything.
710
hljs.registerLanguage('json', json)
8-
const SUPPORTED_LANGUAGES = ['json']
11+
hljs.registerLanguage('javascript', javascript)
12+
hljs.registerLanguage('curl', hljsCurl)
13+
const SUPPORTED_LANGUAGES = ['json', 'javascript', 'curl']
914

1015
// This is the selector we use for the first document.querySelectorAll()
1116
// to find the containers for `<code>` tags. Because it's s dataset
@@ -24,6 +29,8 @@ const CODE_ELEMENTS_PARENT_SELECTOR = '[data-highlight]'
2429
const CODE_SELECTOR = 'pre code'
2530

2631
export default function ClientSideHighlightJS() {
32+
const { asPath } = useRouter()
33+
2734
useEffect(() => {
2835
// Hi Internet Explorer!
2936
// https://developer.mozilla.org/en-US/docs/Web/API/Intersection_Observer_API#browser_compatibility
@@ -59,7 +66,7 @@ export default function ClientSideHighlightJS() {
5966
intersectionObserver.observe(element)
6067
}
6168
}
62-
}, [])
69+
}, [asPath])
6370

6471
return null
6572
}

0 commit comments

Comments
 (0)