diff --git a/.github/workflows/staging-deploy-pr.yml b/.github/workflows/staging-deploy-pr.yml index 81cd9fc64cfc..dc6fe276f900 100644 --- a/.github/workflows/staging-deploy-pr.yml +++ b/.github/workflows/staging-deploy-pr.yml @@ -323,13 +323,17 @@ jobs: name: pr_build path: ${{ runner.temp }} - - name: Extract user-changes to temp directory + # For security reasons, only extract the tar from docs-internal + # This allows us to add search indexes and early access content to the build + - if: ${{ github.repository == 'github/docs-internal' }} + name: Extract user-changes to temp directory run: | mkdir $RUNNER_TEMP/app tar -x --file=$RUNNER_TEMP/app.tar -C "$RUNNER_TEMP/app/" # Move the LFS content into the temp directory in chunks (destructively) - - name: Move the LFS objects + - if: ${{ github.repository == 'github/docs-internal' }} + name: Move the LFS objects run: | git lfs ls-files --name-only | xargs -n 1 -I {} sh -c 'mkdir -p "$RUNNER_TEMP/app/$(dirname {})"; mv {} "$RUNNER_TEMP/app/$(dirname {})/"' @@ -341,9 +345,15 @@ jobs: mv content/early-access "$RUNNER_TEMP/app/content/" mv data/early-access "$RUNNER_TEMP/app/data/" - - name: Create a gzipped archive + - if: ${{ github.repository == 'github/docs-internal' }} + name: Create a gzipped archive (docs-internal) run: tar -cz --file app.tar.gz "$RUNNER_TEMP/app/" + # gzip the app.tar from github/docs so we're working with the same format + - if: ${{ github.repository == 'github/docs' }} + name: Create a gzipped archive (docs) + run: gzip -9 < "$RUNNER_TEMP/app.tar" > app.tar.gz + - name: Create a Heroku build source id: build-source uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d diff --git a/.github/workflows/transfer-to-localization-repo.yml b/.github/workflows/transfer-to-localization-repo.yml new file mode 100644 index 000000000000..62941061788d --- /dev/null +++ b/.github/workflows/transfer-to-localization-repo.yml @@ -0,0 +1,72 @@ +name: Copy to REST API issue to docs-content + +# **What it does**: Copies an issue in the open source repo to the docs-content repo, comments on and closes the original issue +# **Why we have it**: REST API updates cannot be made in the open source repo. Instead, we copy the issue to an internal issue (we do not transfer so that the issue does not disappear for the contributor) and close the original issue. +# **Who does it impact**: Open source and docs-content maintainers + +permissions: + contents: write + +on: + issues: + types: + - labeled + +jobs: + transfer-issue: + name: Transfer issue + runs-on: ubuntu-latest + if: (github.event.label.name == 'localization ' && github.repository == 'github/docs') + steps: + - name: Check if this run was triggered by a member of the docs team + uses: actions/github-script@2b34a689ec86a68d8ab9478298f91d5401337b7d + id: triggered-by-member + with: + github-token: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}} + result-encoding: string + script: | + const triggerer_login = context.payload.sender.login + const teamMembers = await github.request( + `/orgs/github/teams/docs/members?per_page=100` + ) + const logins = teamMembers.data.map(member => member.login) + if (logins.includes(triggerer_login)) { + console.log(`This workflow was triggered by ${triggerer_login} (on the docs team).`) + return 'true' + } + console.log(`This workflow was triggered by ${triggerer_login} (not on the docs team), so no action will be taken.`) + return 'false' + + - name: Exit if not triggered by a docs team member + if: steps.triggered-by-member.outputs.result == 'false' + run: | + echo Aborting. This workflow must be triggered by a member of the docs team. + exit 1 + + - name: Create an issue in the localization repo + run: | + new_issue_url="$(gh issue create --title "$ISSUE_TITLE" --body "$ISSUE_BODY" --repo github/localization)" + echo 'NEW_ISSUE='$new_issue_url >> $GITHUB_ENV + env: + GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}} + ISSUE_TITLE: ${{ github.event.issue.title }} + ISSUE_BODY: ${{ github.event.issue.body }} + + - name: Comment on the new issue + run: gh issue comment $NEW_ISSUE --body "This issue was originally opened in the open source repo as $OLD_ISSUE" + env: + GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}} + NEW_ISSUE: ${{ env.NEW_ISSUE }} + OLD_ISSUE: ${{ github.event.issue.html_url }} + + - name: Comment on the old issue + run: gh issue comment $OLD_ISSUE --body "Thank you for opening this issue! Updates to translated content must be made internally. I have copied your issue to an internal issue, so I will close this issue." + env: + GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}} + OLD_ISSUE: ${{ github.event.issue.html_url }} + + - name: Close the old issue + run: gh issue close $OLD_ISSUE + env: + GITHUB_TOKEN: ${{secrets.DOCUBOT_READORG_REPO_WORKFLOW_SCOPES}} + OLD_ISSUE: ${{ github.event.issue.html_url }} diff --git a/Dockerfile.openapi_decorator b/Dockerfile.openapi_decorator index a0e5a0c2e019..6014681b41da 100644 --- a/Dockerfile.openapi_decorator +++ b/Dockerfile.openapi_decorator @@ -13,6 +13,7 @@ COPY --chown=node:node package-lock.json /openapi-check ADD --chown=node:node script /openapi-check/script ADD --chown=node:node lib /openapi-check/lib ADD --chown=node:node content /openapi-check/content +ADD --chown=node:node data /openapi-check/data RUN npm ci -D diff --git a/assets/images/help/business-accounts/dormant-users-download-button.png b/assets/images/help/business-accounts/dormant-users-download-button.png new file mode 100644 index 000000000000..4e6d71ad8363 Binary files /dev/null and b/assets/images/help/business-accounts/dormant-users-download-button.png differ diff --git a/assets/images/help/business-accounts/enterprise-accounts-compliance-tab.png b/assets/images/help/business-accounts/enterprise-accounts-compliance-tab.png new file mode 100644 index 000000000000..5bad99d0d9c3 Binary files /dev/null and b/assets/images/help/business-accounts/enterprise-accounts-compliance-tab.png differ diff --git a/components/page-header/Header.module.scss b/components/page-header/Header.module.scss index 3e82493512e0..c10f74153f9d 100644 --- a/components/page-header/Header.module.scss +++ b/components/page-header/Header.module.scss @@ -1,3 +1,7 @@ .breadcrumbs { clip-path: inset(-5px -5px -5px 0px); } + +.header { + display: unset; +} diff --git a/components/page-header/Header.tsx b/components/page-header/Header.tsx index 939c6caed3be..832e86db58ce 100644 --- a/components/page-header/Header.tsx +++ b/components/page-header/Header.tsx @@ -41,13 +41,18 @@ export const Header = () => { return (