Skip to content

Commit 7df9986

Browse files
authored
Merge branch 'main' into main
2 parents 3766c3c + 53d1e2f commit 7df9986

File tree

1,039 files changed

+20235
-19315
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,039 files changed

+20235
-19315
lines changed

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

Lines changed: 27 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ The following large repositories are used throughout this checklist, it may be u
99
- `github/github`
1010
- `github/docs-internal`
1111

12-
Additionally, you may want to download:
12+
Additionally, download:
1313

1414
- [Azure Storage Explorer](https://aka.ms/portalfx/downloadstorageexplorer)
1515

@@ -40,7 +40,7 @@ Additionally, you may want to download:
4040

4141
**Note:** You can pass the `--dry-run` flag to scrape only the first 10 pages plus their redirects for testing purposes. **If you use the dry run command, be sure to run the full script without `--dry-run` before you commit the changes.**
4242

43-
## Step 3: Manually remove the search input from the archived docs
43+
## Step 2: Manually remove the search input from the archived docs
4444

4545
- [ ] 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/ or VSCode to reformat it to be readable. To reformat using VSCode, use the "Format document" option or <kbd>Shift</kbd>+<kbd>Option</kbd>+<kbd>F</kbd>. Find `site-search-input` in the file, the result will be enclosed in a function that looks something like... `(0,f.jsx)("input",{"data-testid":"site-search-input",` Delete the entire function. For example, this:
4646
```
@@ -88,7 +88,7 @@ Additionally, you may want to download:
8888
```
8989
- [ ] Save the file. If using beautifier, copy and paste the updated file back into your temp directory with the scraped archive content.
9090

91-
## Step 2: Upload the scraped content directory to Azure storage
91+
## Step 3: Upload the scraped content directory to Azure storage
9292

9393
- [ ] 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).
9494
- [ ] 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.
@@ -97,7 +97,11 @@ Additionally, you may want to download:
9797
- [ ] Check the log to ensure all files were uploaded successfully.
9898
- [ ] Remove the temporarily created directory from your `github/docs-internal` checkout.
9999

100-
## Step 4: Deprecate the version in docs-internal
100+
## Step 4: Create a tag and long-running branch
101+
102+
Create a new tag for the most recent commit on the `main` branch so that we can keep track of where in commit history we removed the GHES release. Create a tag called `enterprise-<release number>-release`. Then from that commit on `main` create a new branch called `enterprise-<release number>-release`. This branch will be long-lived and used to rerender and scrape content that is added after a release is deprecated.
103+
104+
## Step 5: Deprecate the version in docs-internal
101105

102106
In your `docs-internal` checkout:
103107

@@ -111,7 +115,7 @@ You can test that the static pages were generated correctly on localhost and on
111115

112116
Poke around several pages, ensure that the stylesheets are working properly, images are rendering properly, and that the search functionality was disabled.
113117

114-
## Step 5: Remove static files for the version
118+
## Step 6: Remove static files for the version
115119

116120
**Note:** We do not remove the old content for GHES release notes. New release notes can be added after we perform a deprecation in some rare cases, and not removing this content makes it easier for us to re-scrape the content to add to Azure Blob Storage.
117121

@@ -121,7 +125,7 @@ Poke around several pages, ensure that the stylesheets are working properly, ima
121125
- [ ] Open a new PR.
122126
- [ ] 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.
123127

124-
## Step 6: Remove the liquid conditionals and content for the version
128+
## Step 7: Remove the liquid conditionals and content for the version
125129

126130
- [ ] 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).
127131
- [ ] Remove the outdated Liquid markup and frontmatter.
@@ -131,17 +135,31 @@ Poke around several pages, ensure that the stylesheets are working properly, ima
131135
- [ ] 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.
132136
- [ ] When the PR is approved, merge it in to complete the deprecation. This can be merged independently from step 5.
133137

134-
## Step 7: Deprecate the OpenAPI description in `github/github`
138+
## Step 8: Deprecate the OpenAPI description in `github/github`
135139

136140
- [ ] In `github/github`, edit the release's config file in `app/api/description/config/releases/`, and change `deprecated: false` to `deprecated: true`.
137141
- [ ] Open a new PR, and get the required code owner approvals. A docs-content team member can approve it for the docs team.
138142
- [ ] When the PR is approved, [deploy the `github/github` PR](https://thehub.github.com/epd/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.
139143

140144
**Note**: you can do this step independently of the other steps after a GHES version is deprecated since it should no longer get updates in github/github. You should plan to get this PR merged as soon as possible, otherwise if you wait too long our OpenAPI automation may re-add the static files that you removed in step 5.
141145

142-
## Step 5: Continue to deprecate the version in docs-internal
146+
## Step 9: Continue to deprecate the version in docs-internal
143147

144148
- [ ] Open a new PR. Make sure to check the following:
145149
- [ ] Tests are passing (you may need to include the changes in step 6 to get tests to pass).
146150
- [ ] 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.
147-
- [ ] 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.
151+
- [ ] 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.
152+
153+
## Re-scraping a page or all pages
154+
155+
Occasionally, a change will need to be added to our archived enterprise versions. If this occurs, you can check out the `enterprise-<release number>-release` branch and re-scrape the page or all pages using `script/enterprise-server-deprecations/archive-version.js`. To scrape a single page you can use the `—page <page relative path>` option.
156+
157+
For each language, upload the new file to Azure blob storage in the `enterprise` container.
158+
159+
After uploading the new files, you will need to purge the Fastly cache for the single page. From Okta, go to Fastly and select `docs`. Click `Purge` then `Purge URL`. If you need to purge a whole path, just do a `Purge All`
160+
161+
![](/assets/images/fastly_purge.jpg)
162+
163+
Enter the URL or path and do a soft purge.
164+
165+
![](/assets/images/fastly_purge_url.jpg)
Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
#!/usr/bin/env node
2+
3+
import { languageKeys } from '../../lib/languages.js'
4+
5+
import { makeLanguageSurrogateKey } from '../../middleware/set-fastly-surrogate-key.js'
6+
import purgeEdgeCache from '../../script/deployment/purge-edge-cache.js'
7+
8+
// This covers things like `/api/webhooks` which isn't language specific.
9+
await purgeEdgeCache(makeLanguageSurrogateKey())
10+
11+
const languages = process.env.LANGUAGES
12+
? languagesFromString(process.env.LANGUAGES)
13+
: // Make sure `en` is first because contributors write mostly in English
14+
// and they're most likely wanting to see their landed changes appear
15+
// in production as soon as possible.
16+
languageKeys.sort((a) => (a === 'en' ? -1 : 1))
17+
18+
for (const language of languages) {
19+
await purgeEdgeCache(makeLanguageSurrogateKey(language))
20+
}
21+
22+
function languagesFromString(str) {
23+
const languages = str
24+
.split(/,/)
25+
.map((x) => x.trim())
26+
.filter(Boolean)
27+
if (!languages.every((lang) => languageKeys.includes(lang))) {
28+
throw new Error(
29+
`Unrecognized language code (${languages.find((lang) => !languageKeys.includes(lang))})`
30+
)
31+
}
32+
return languages
33+
}
Lines changed: 18 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,21 @@
11
#!/usr/bin/env node
2-
2+
import { SURROGATE_ENUMS } from '../../middleware/set-fastly-surrogate-key.js'
33
import purgeEdgeCache from '../../script/deployment/purge-edge-cache.js'
44

5-
await purgeEdgeCache()
5+
// This will purge every response that *contains*
6+
// `process.env.FASTLY_SURROGATE_KEY || SURROGATE_ENUMS.DEFAULT`.
7+
// We normally send Surrogate-Key values like:
8+
//
9+
// every-deployment language:en
10+
// every-deployment language:fr
11+
// every-deployment language:ja
12+
// or
13+
// every-deployment no-language
14+
//
15+
// But if you send a purge request for just:
16+
//
17+
// every-deployment
18+
//
19+
// It will cover all surrogate keys that contain that.
20+
// So this the nuclear option for all keys with this prefix.
21+
await purgeEdgeCache(process.env.FASTLY_SURROGATE_KEY || SURROGATE_ENUMS.DEFAULT)

.github/workflows/add-review-template.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Checkout
23-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
23+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
2424

2525
# Jump through some hoops to work with a multi-line file
2626
- name: Store review template in variable

.github/workflows/azure-preview-env-deploy.yml

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -81,15 +81,15 @@ jobs:
8181

8282
- if: ${{ env.IS_PUBLIC_BUILD == 'true' }}
8383
name: Check out main branch
84-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
84+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
8585
with:
8686
ref: 'main'
8787
persist-credentials: 'false'
8888
lfs: 'true'
8989

9090
- if: ${{ env.IS_INTERNAL_BUILD == 'true' }}
9191
name: Check out PR code
92-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
92+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
9393
with:
9494
ref: ${{ env.COMMIT_REF }}
9595
# To prevent issues with cloning early access content later
@@ -141,7 +141,7 @@ jobs:
141141
142142
- if: ${{ env.IS_INTERNAL_BUILD == 'true' }}
143143
name: Clone docs-early-access
144-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
144+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
145145
with:
146146
repository: github/docs-early-access
147147
token: ${{ secrets.DOCUBOT_REPO_PAT }}
@@ -154,7 +154,7 @@ jobs:
154154

155155
- if: ${{ env.IS_PUBLIC_BUILD == 'true' }}
156156
name: Check out user code to temp directory
157-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
157+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
158158
with:
159159
path: ./user-code
160160
ref: ${{ env.COMMIT_REF }}

.github/workflows/azure-preview-env-destroy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -40,7 +40,7 @@ jobs:
4040
creds: ${{ secrets.NONPROD_AZURE_CREDENTIALS }}
4141

4242
- name: Check out repo
43-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
43+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
4444

4545
- name: Get preview app info
4646
env:

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

Lines changed: 3 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ concurrency:
2323
jobs:
2424
azure-prod-build-and-deploy:
2525
if: ${{ github.repository == 'github/docs-internal' }}
26-
runs-on: ubuntu-latest
26+
runs-on: ubuntu-20.04-xl
2727
timeout-minutes: 20
2828
environment:
2929
name: production
@@ -49,15 +49,11 @@ jobs:
4949
uses: docker/setup-buildx-action@95cb08cb2672c73d4ffd2f422e6d11953d2a9c70
5050

5151
- name: Check out repo
52-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
52+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
5353
with:
5454
ref: ${{ github.sha }}
5555
# To prevent issues with cloning early access content later
5656
persist-credentials: 'false'
57-
lfs: 'true'
58-
59-
- name: Check out LFS objects
60-
run: git lfs checkout
6157

6258
- name: Setup node
6359
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
@@ -66,7 +62,7 @@ jobs:
6662
cache: npm
6763

6864
- name: Clone docs-early-access
69-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
65+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
7066
with:
7167
repository: github/docs-early-access
7268
token: ${{ secrets.DOCUBOT_REPO_PAT }}
@@ -143,13 +139,6 @@ jobs:
143139
run: |
144140
az webapp deployment slot swap --slot canary --target-slot production -n ghdocs-prod -g docs-prod
145141
146-
- name: Purge Fastly edge cache
147-
env:
148-
FASTLY_TOKEN: ${{ secrets.FASTLY_TOKEN }}
149-
FASTLY_SERVICE_ID: ${{ secrets.FASTLY_SERVICE_ID }}
150-
FASTLY_SURROGATE_KEY: 'every-deployment'
151-
run: npm install got && .github/actions-scripts/purge-fastly-edge-cache.js
152-
153142
send-slack-notification-on-failure:
154143
needs: [azure-prod-build-and-deploy]
155144
runs-on: ubuntu-latest

.github/workflows/azure-staging-build-deploy.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -60,7 +60,7 @@ jobs:
6060
uses: docker/setup-buildx-action@95cb08cb2672c73d4ffd2f422e6d11953d2a9c70
6161

6262
- name: Check out repo
63-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
63+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
6464
with:
6565
ref: ${{ env.COMMIT_REF }}
6666
# To prevent issues with cloning early access content later
@@ -84,7 +84,7 @@ jobs:
8484
cache: npm
8585

8686
- name: Clone docs-early-access
87-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
87+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
8888
with:
8989
repository: github/docs-early-access
9090
token: ${{ secrets.DOCUBOT_REPO_PAT }}

.github/workflows/browser-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
discovery type: 'single-node'
5050

5151
- name: Checkout
52-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
52+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
5353
with:
5454
lfs: true
5555

.github/workflows/check-broken-links-github-github.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,13 +39,13 @@ jobs:
3939
exit 1 # prevents further steps from running
4040
4141
- name: Checkout
42-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
42+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
4343
with:
4444
# To prevent issues with cloning early access content later
4545
persist-credentials: 'false'
4646

4747
- name: Clone docs-early-access
48-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
48+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
4949
with:
5050
repository: github/docs-early-access
5151
token: ${{ secrets.DOCUBOT_REPO_PAT }}
@@ -92,7 +92,7 @@ jobs:
9292
- if: ${{ failure() && env.FREEZE != 'true' }}
9393
name: Get title for issue
9494
id: check
95-
run: echo "::set-output name=title::$(head -1 broken_github_github_links.md)"
95+
run: echo "title=$(head -1 broken_github_github_links.md)" >> $GITHUB_OUTPUT
9696
- if: ${{ failure() && env.FREEZE != 'true'}}
9797
name: Create issue from file
9898
id: github-github-broken-link-report

.github/workflows/code-lint.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
runs-on: ubuntu-latest
3636
steps:
3737
- name: Check out repo
38-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
38+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
3939

4040
- name: Setup node
4141
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048

.github/workflows/codeql.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ jobs:
3030
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
3131
runs-on: ubuntu-latest
3232
steps:
33-
- uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
33+
- uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
3434
- uses: github/codeql-action/init@1ed1437484560351c5be56cf73a48a279d116b78
3535
with:
3636
languages: javascript # comma separated list of values from {go, python, javascript, java, cpp, csharp, ruby}

.github/workflows/content-changes-table-comment.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,7 +49,7 @@ jobs:
4949
PR_NUMBER: ${{ github.event.pull_request.number }}
5050
steps:
5151
- name: check out repo content
52-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
52+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
5353

5454
- name: Get preview app info
5555
env:

.github/workflows/docs-review-collect.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ jobs:
2020

2121
steps:
2222
- name: Check out repo content
23-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
23+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
2424

2525
- name: Setup Node
2626
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048

.github/workflows/enterprise-dates.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ jobs:
3636
exit 1 # prevents further steps from running
3737
3838
- name: Checkout repository code
39-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
39+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
4040

4141
- name: Setup Node
4242
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048

.github/workflows/link-check-daily.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
run: gh --version
2424

2525
- name: Check out repo's default branch
26-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
26+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
2727
- name: Setup Node
2828
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
2929
with:
@@ -43,7 +43,7 @@ jobs:
4343

4444
- name: Check out docs-early-access too, if internal repo
4545
if: ${{ github.repository == 'github/docs-internal' }}
46-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
46+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
4747
with:
4848
repository: github/docs-early-access
4949
token: ${{ secrets.DOCUBOT_REPO_PAT }}

.github/workflows/link-check-on-pr.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -29,7 +29,7 @@ jobs:
2929
if: github.repository == 'github/docs-internal' || github.repository == 'github/docs'
3030
steps:
3131
- name: Checkout
32-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
32+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
3333

3434
- name: Setup node
3535
uses: actions/setup-node@17f8bd926464a1afa4c6a11669539e9c1ba77048
@@ -50,7 +50,7 @@ jobs:
5050

5151
- name: Check out docs-early-access too, if internal repo
5252
if: ${{ github.repository == 'github/docs-internal' }}
53-
uses: actions/checkout@dcd71f646680f2efd8db4afa5ad64fdcba30e748
53+
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
5454
with:
5555
repository: github/docs-early-access
5656
token: ${{ secrets.DOCUBOT_REPO_PAT }}

0 commit comments

Comments
 (0)