Skip to content

Commit 0ae3d35

Browse files
authored
Merge pull request #16143 from github/hidden-docs-alt
Early-access docs V2
2 parents 11d8e41 + ca39999 commit 0ae3d35

45 files changed

Lines changed: 876 additions & 356 deletions

Some content is hidden

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

.env.example

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,3 @@
11
ALGOLIA_API_KEY=
22
ALGOLIA_APPLICATION_ID=
33
ALLOW_TRANSLATION_COMMITS=
4-
EARLY_ACCESS_HOSTNAME=
5-
EARLY_ACCESS_SHARED_SECRET=
6-
GITHUB_TOKEN=

.github/workflows/test.yml

Lines changed: 13 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
with:
2828
cancel_others: 'false'
2929
github_token: ${{ github.token }}
30-
paths: '[".github/workflows/test.yml",".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]'
30+
paths: '[".github/workflows/test.yml", ".node-version", ".npmrc", "app.json", "content/**", "data/**","lib/**", "Dockerfile", "feature-flags.json", "Gemfile", "Gemfile.lock", "middleware/**", "node_modules/**","package.json", "package-lock.json", "server.js", "tests/**", "translations/**", "Procfile", "webpack.config.js"]'
3131

3232
test:
3333
needs: see_if_should_skip
@@ -44,6 +44,9 @@ jobs:
4444
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
4545
name: Check out repo
4646
uses: actions/checkout@5a4ac9002d0be2fb38bd78e4b4dbde5606d7042f
47+
with:
48+
# Enables cloning the Early Access repo later with the relevant PAT
49+
persist-credentials: 'false'
4750

4851
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
4952
name: Setup node
@@ -70,19 +73,19 @@ jobs:
7073
name: Install dependencies
7174
run: npm ci
7275

73-
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
74-
name: Run build script
76+
- name: Clone early access
77+
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository == 'github/docs-internal' }}
78+
run: npm run heroku-postbuild
79+
env:
80+
DOCUBOT_REPO_PAT: ${{ secrets.DOCUBOT_REPO_PAT }}
81+
GIT_BRANCH: ${{ github.ref }}
82+
83+
- name: Run build script
84+
if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' && github.repository != 'github/docs-internal' }}
7585
run: npm run build
7686

7787
- if: ${{ needs.see_if_should_skip.outputs.should_skip != 'true' }}
7888
name: Run tests
7989
run: npx jest tests/${{ matrix.test-group }}/
8090
env:
8191
NODE_OPTIONS: '--max_old_space_size=4096'
82-
83-
- name: Send Slack notification if workflow fails
84-
uses: rtCamp/action-slack-notify@e17352feaf9aee300bf0ebc1dfbf467d80438815
85-
if: failure() && github.ref == 'early-access'
86-
env:
87-
SLACK_WEBHOOK: ${{ secrets.DOCS_ALERTS_SLACK_WEBHOOK }}
88-
SLACK_MESSAGE: 'Tests are failing on the `early-access` branch.'

.gitignore

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
11
.algolia-cache
22
.DS_Store
33
.env
4-
node_modules
4+
/node_modules/
55
npm-debug.log
6-
coverage
6+
coverage/
77
.linkinator
8-
broken_links.md
8+
/assets/images/early-access
9+
/content/early-access
10+
/data/early-access
911
dist
12+
13+
# blc: broken link checker
14+
blc_output.log
15+
blc_output_internal.log
16+
/dist/
17+
broken_links.md

content/rest/overview/api-previews.md

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,6 @@
22
title: API previews
33
intro: You can use API previews to try out new features and provide feedback before these features become official.
44
redirect_from:
5-
- /early-access/
65
- /v3/previews
76
versions:
87
free-pro-team: '*'
@@ -60,7 +59,7 @@ Create, list, update, and delete environments for pre-receive hooks.
6059
{% if enterpriseServerVersions contains currentVersion and currentVersion ver_lt "enterprise-server@2.22" %}
6160
### Integrations
6261

63-
Manage [integrations](/early-access/integrations/) through the API.
62+
Manage [integrations](/v3/integrations) through the API.
6463

6564
**Custom media type:** `machine-man-preview`
6665
**Announced:** [2016-09-14](https://developer.github.com/changes/2016-09-14-Integrations-Early-Access/)

crowdin.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -3,17 +3,19 @@ files:
33
translation: /translations/%locale%/%original_path%/%original_file_name%
44
ignore:
55
- '/content/README.md'
6+
- '/content/early-access'
67
- source: /data/**/*.yml
78
translation: /translations/%locale%/%original_path%/%original_file_name%
89
- source: /data/**/*.md
910
translation: /translations/%locale%/%original_path%/%original_file_name%
1011
ignore:
11-
- 'data/README.md'
12-
- 'data/reusables/README.md'
13-
- 'data/variables/product.yml'
14-
- 'data/variables/README.md'
15-
- 'data/graphql'
16-
- 'data/products.yml'
12+
- '/data/README.md'
13+
- '/data/reusables/README.md'
14+
- '/data/variables/product.yml'
15+
- '/data/variables/README.md'
16+
- '/data/early-access'
17+
- '/data/graphql'
18+
- '/data/products.yml'
1719

1820
# These end up as env vars used by the GitHub Actions workflow
1921
project_id_env: CROWDIN_PROJECT_ID

includes/article.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -67,7 +67,7 @@ <h3 id="in-this-article" class="f5 mb-2"><a class="link-gray-dark" href="#in-thi
6767

6868
<div class="d-block border-top border-gray-light mt-4 markdown-body">
6969
{% include helpfulness %}
70-
{% include contribution %}
70+
{% unless page.hidden %}{% include contribution %}{% endunless %}
7171
</div>
7272
</article>
7373
</main>

includes/breadcrumbs.html

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
<nav class="breadcrumbs f5" aria-label="Breadcrumb">
22
{% for breadcrumb in breadcrumbs %}
3+
{% if page.hidden %}
4+
<span class="d-inline-block">{{breadcrumb[1].title}}</span>
5+
{% else %}
36
<a title="{{ breadcrumb[0]}}: {{breadcrumb[1].title}}" href="/{{currentLanguage}}{{breadcrumb[1].href}}" class="d-inline-block {% if breadcrumb[1].href == currentPathWithoutLanguage %}text-gray-light{% endif %}">
47
{{breadcrumb[1].title}}</a>
8+
{% endif %}
59
{% endfor %}
610
</nav>

includes/header.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,7 @@
11
<div class="border-bottom border-gray-light no-print">
2+
{% unless error == '404' %}
23
{% include header-notification %}
4+
{% endunless %}
35

46
<header class="container-xl px-3 px-md-6 pt-3 pb-2 position-relative d-flex flex-justify-between width-full {% if error == '404' %} d-md-none {% endif %}">
57

includes/sidebar-specific-product.html

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,9 @@
99
{% assign product = siteTree[currentLanguage][currentVersion].products[currentProduct] %}
1010
{% include all-products-link %}
1111
<li title="{{product.title}}" class="sidebar-product mb-2">
12+
{% unless page.hidden %}
1213
<a href="/{{currentLanguage}}{{product.href}}" class="pl-4 pr-5 pb-1 f4">{{ product.title }}</a>
14+
{% endunless %}
1315
</li>
1416
<ul class="sidebar-categories list-style-none">
1517
{% for category in product.categories %}

lib/algolia/find-indexable-pages.js

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,10 @@ const loadPages = require('../pages')
33
module.exports = async function findIndexablePages () {
44
const allPages = await loadPages()
55
const indexablePages = allPages
6-
// exclude pages that are part of WIP products
7-
.filter(page => !page.parentProduct || !page.parentProduct.wip)
6+
// exclude hidden pages
7+
.filter(page => !page.hidden)
8+
// exclude pages that are part of WIP or hidden products
9+
.filter(page => !page.parentProduct || !page.parentProduct.wip || page.parentProduct.hidden)
810
// exclude index homepages
911
.filter(page => !page.relativePath.endsWith('index.md'))
1012

0 commit comments

Comments
 (0)