Skip to content

Commit 8f2378b

Browse files
build: perform 404 scanning on docs (#2305)
1 parent 8fc4dce commit 8f2378b

File tree

11 files changed

+43
-42
lines changed

11 files changed

+43
-42
lines changed

.github/workflows/lint.yaml .github/workflows/ci.yaml

+7
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,10 @@ jobs:
1414
node-version: 14
1515
- run: npm install
1616
- run: npm run lint
17+
docs:
18+
runs-on: ubuntu-latest
19+
steps:
20+
- uses: actions/checkout@v2
21+
- uses: JustinBeckwith/linkinator-action@v1
22+
with:
23+
paths: "**/*.md"

CONTRIBUTING.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
# How to become a contributor and submit your own code
22

3-
This repository contains samples that the documentation on [Google Cloud Platform ][cloud] references. Samples for a client library should be added to the client repository, not this repository. (For example, the `functions` folder is reserved for samples used in [cloud.google.com/functions](cloud.google.com/functions)). If you wrote a great sample but it is not used in Google's official documentation, there are better suited places to publish it such as a [community tutorial](https://cloud.google.com/community/).
3+
This repository contains samples that the documentation on [Google Cloud Platform ][cloud] references. Samples for a client library should be added to the client repository, not this repository. (For example, the `functions` folder is reserved for samples used in [cloud.google.com/functions](https://cloud.google.com/functions)). If you wrote a great sample but it is not used in Google's official documentation, there are better suited places to publish it such as a [community tutorial](https://cloud.google.com/community/).
44

55
## Run the tests for a single sample
66

7-
1. Obtain authentication credentials. Depending on the sample, you
7+
1. Obtain authentication credentials. Depending on the sample, you
88
need to enable the appropriate APIs in the [Cloud Console](https://console.cloud.google.com/apis/library).
99

1010
gcloud auth application-default login
@@ -13,7 +13,7 @@ need to enable the appropriate APIs in the [Cloud Console](https://console.cloud
1313

1414
cd datastore/
1515

16-
1. Install the dependencies.
16+
1. Install the dependencies.
1717

1818
npm install
1919

@@ -24,11 +24,11 @@ need to enable the appropriate APIs in the [Cloud Console](https://console.cloud
2424

2525
## Adding new samples
2626

27-
All samples must have tests. We use `mocha` as testing framework.
27+
All samples must have tests. We use `mocha` as testing framework.
2828

2929
Add a **build configuration file (`.cfg`)** for your samples in **[`.kokoro/`](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/.kokoro)**. Check existing config files for the right format.
3030

31-
All tests need a corresponding job file outside of GitHub. If you are a Googler, please provide the CL alongside your PR. See the internal codelab for Kokoro for details. If you don't work at Google, the person reviewing your PR will create the job config for you.
31+
All tests need a corresponding job file outside of GitHub. If you are a Googler, please provide the CL alongside your PR. See the internal codelab for Kokoro for details. If you don't work at Google, the person reviewing your PR will create the job config for you.
3232

3333
### Style
3434

@@ -44,4 +44,4 @@ directory.
4444
[cloud]: https://cloud.google.com/
4545

4646
## Failing CI
47-
`Required` tests need to pass. Tests that are not required are expected to fail, they are usually work in progress.
47+
`Required` tests need to pass. Tests that are not required are expected to fail, they are usually work in progress.

README.md

+1-12
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Node.js samples for [Google Cloud Platform products][cloud].
77
See [cloud.google.com/nodejs][cloud_nodejs] to get up and running with Node.js
88
on Google Cloud Platform.
99

10-
[slack_badge]: https://img.shields.io/badge/slack-Google%20Cloud%20Platform-E01563.svg
10+
[slack_badge]: https://img.shields.io/badge/slack-Google%20Cloud%20Platform-E01563.svg
1111
[slack_link]: https://googlecloud-community.slack.com/
1212
[cloud]: https://cloud.google.com/
1313
[cloud_nodejs]: https://cloud.google.com/nodejs/
@@ -62,17 +62,6 @@ View the [tutorial][bookshelf_docs] or the [source code][bookshelf_code].
6262
[bookshelf_docs]: https://cloud.google.com/nodejs/getting-started/tutorial-app
6363
[bookshelf_code]: https://github.com/GoogleCloudPlatform/nodejs-getting-started
6464

65-
### Node.js Codelab
66-
67-
In the [Node.js Web App Google Cloud Platform][codelab_docs] codelab, you learn
68-
how to integrate Google Cloud Platform services into a Node.js web application
69-
to store data, upload images, and authenticate users.
70-
71-
View the [tutorial][codelab_docs] or the [source code][codelab_code].
72-
73-
[codelab_docs]: https://gcplab.me/codelabs/cloud-nodejs/index.html
74-
[codelab_code]: https://github.com/googlecodelabs/cloud-nodejs
75-
7665
## Contributing
7766

7867
Contributions welcome! See the [Contributing Guide][contrib].

appengine/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ are referenced from the documentation on [cloud.google.com][appengine].
66

77
There are also samples [submitted by the community][community_samples].
88

9-
See our other [Google Cloud Platform GitHub repositories](/GoogleCloudPlatform)
9+
See our other [Google Cloud Platform GitHub repositories](https://github.com/GoogleCloudPlatform)
1010
for sample applications and scaffolding for other frameworks and use cases.
1111

1212
* [Run Locally](#run-locally)
@@ -46,7 +46,7 @@ The App Engine Node.js samples typically require that you do the following:
4646
npm start
4747

4848

49-
1. Visit the application at [http://localhost:8080][].
49+
1. Visit the application at http://localhost:8080.
5050

5151
## Deploying
5252

appengine/endpoints/README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ Then, deploy the sample using `gcloud`:
1717

1818
gcloud beta app deploy
1919

20-
Once deployed, you can access the application at https://YOUR-PROJECT-ID.appspot.com/.
20+
Once deployed, you can access the application at `https://YOUR-PROJECT-ID.appspot.com/`.
2121

2222
## Send an echo request
2323

functions/README.md

-5
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,9 @@ environment.
2020
## Samples
2121

2222
* [Hello World](helloworld/)
23-
* [Background](background/)
24-
* [Callbacks](messages/)
2523
* [Cloud Pub/Sub](pubsub/)
2624
* [Cloud Spanner](spanner/)
27-
* [Dependencies](uuid/)
28-
* [Error Reporting](errorreporting/)
2925
* [HTTP](http/)
3026
* [Logging & Monitoring](log/)
3127
* [OCR (Optical Character Recognition)](ocr/)
32-
* [SendGrid](sendgrid/)
3328
* [Slack](slack/)

linkinator.config.json

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
{
2+
"recurse": true,
3+
"skip": [
4+
"http://localhost:8080*",
5+
"\/node_modules\/"
6+
],
7+
"silent": true,
8+
"concurrency": 10,
9+
"directoryListing": true
10+
}

monitoring/opencensus/README.md

+6-6
Original file line numberDiff line numberDiff line change
@@ -17,20 +17,20 @@ OpenCensus is a toolkit for collecting application performance and behavior data
1717
npm install
1818

1919

20-
[prereq]: ../README.md#prerequisites
21-
[run]: ../README.md#how-to-run-a-sample
20+
[prereq]: ../../README.md#prerequisites
21+
[run]: ../../README.md#how-to-run-a-sample
2222

2323
## Samples
2424

2525
### SLI metrics
2626

2727
View the [documentation][stats_0_docs] or the [source code][stats_0_code].
2828

29-
Start the server locally by running
30-
29+
Start the server locally by running
30+
3131
node app.js
32-
33-
and send requests to it at
32+
33+
and send requests to it at
3434

3535
http://localhost:8080
3636

monitoring/prometheus/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -16,8 +16,8 @@ Prometheus is an open-source systems monitoring and alerting toolkit originally
1616

1717
npm install
1818

19-
[prereq]: ../README.md#prerequisites
20-
[run]: ../README.md#how-to-run-a-sample
19+
[prereq]: ../../README.md#prerequisites
20+
[run]: ../../README.md#how-to-run-a-sample
2121

2222
## Samples
2323

@@ -26,9 +26,9 @@ Prometheus is an open-source systems monitoring and alerting toolkit originally
2626
View the [documentation][prometheus_0_docs] or the [source code][prometheus_0_code].
2727

2828
Start the server locally by running
29-
29+
3030
node app.js
31-
31+
3232
and send requests to it at
3333

3434
http://localhost:8080

run/idp-sql/README.md

+2-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ Use it with the [End user Authentication for Cloud Run](http://cloud.google.com/
77

88
For more details on how to work with this sample read the [Google Cloud Run Node.js Samples README](https://github.com/GoogleCloudPlatform/nodejs-docs-samples/tree/master/run).
99

10-
[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run)
10+
[![Run on Google Cloud](https://deploy.cloud.run/button.svg)](https://deploy.cloud.run/?git_repo=https://github.com/GoogleCloudPlatform/nodejs-docs-samples&dir=run/idp-sql)
1111

1212
## Dependencies
1313

@@ -49,7 +49,7 @@ Other environment variables:
4949

5050
* Saving credentials directly as environment variables is convenient for local testing,
5151
but not secure for production; therefore using `CLOUD_SQL_CREDENTIALS_SECRET`
52-
in combination with the Cloud Secrets Manager is recommended.
52+
in combination with the Cloud Secrets Manager is recommended.
5353

5454
## Running Locally
5555

workflows/quickstart/README.md

+4-4
Original file line numberDiff line numberDiff line change
@@ -17,11 +17,11 @@ This sample shows how to execute a Cloud Workflow and wait for the workflow exec
1717
## Run the Quickstart
1818

1919
1. Run the script, either with environment variables or command-line arguments:
20-
20+
2121
`node . <projectId> [cloudRegion] [workflowName]`.
22-
22+
2323
_or_
24-
24+
2525
`GOOGLE_CLOUD_PROJECT=... node .`: The Cloud project with the workflow `myFirstWorkflow`.
2626

2727
1. Observe the results:
@@ -32,4 +32,4 @@ This sample shows how to execute a Cloud Workflow and wait for the workflow exec
3232
["Wednesday","Wednesday Night Wars","Wednesday 13","Wednesday Addams","Wednesday Campanella","Wednesdayite","Wednesday Martin","Wednesday Campanella discography","Wednesday Night Hockey (American TV program)","Wednesday Morning, 3 A.M."]
3333
```
3434

35-
[prereq]: ../README.md#prerequisities
35+
[prereq]: ../../README.md#prerequisities

0 commit comments

Comments
 (0)