Skip to content

Commit 577a9fd

Browse files
committed
website: update deploying sections in README files
Use the README in cmd/golangorg directory as the canonical location for documenting the deployment process for websites served by that command. The top-level README now redirects to it, just like the README in tour directory. Add more context on how the website uses tests to ensure that deploys can be done safely. While here, also shorten various URLs to use the new go.dev domain. For golang/go#36707. Updates golang/go#39687. Change-Id: If5cf7a74b19830540b29612de37286c5f14244a1 Reviewed-on: https://go-review.googlesource.com/c/website/+/367994 Reviewed-by: Russ Cox <[email protected]> Reviewed-by: Katie Hockman <[email protected]> Trust: Katie Hockman <[email protected]> Trust: Dmitri Shuralyov <[email protected]>
1 parent 1167ccd commit 577a9fd

File tree

3 files changed

+36
-33
lines changed

3 files changed

+36
-33
lines changed

README.md

Lines changed: 7 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33
[![Go Reference](https://pkg.go.dev/badge/golang.org/x/website.svg)](https://pkg.go.dev/golang.org/x/website)
44

5-
This repo holds content and serving programs for the golang.org and go.dev web sites.
5+
This repo holds content and serving programs for the go.dev and golang.org web sites.
66

7-
Content is in _content/ (go.dev) and tour/ (tour.golang.org).
7+
Content is in _content/ (go.dev) and tour/ (go.dev/tour).
88
Server code is in cmd/ and internal/.
99

10-
To run the combined golang.org+go.dev server to preview local content changes, use:
10+
To run the combined go.dev+golang.org server to preview local content changes, use:
1111

1212
go run ./cmd/golangorg
1313

@@ -23,7 +23,7 @@ This repository uses [prettier](https://prettier.io/) to format JS and CSS files
2323

2424
See also:
2525

26-
- [CSS](https://golang.org/wiki/CSSStyleGuide)
26+
- [CSS](https://go.dev/wiki/CSSStyleGuide)
2727
- [JavaScript](https://google.github.io/styleguide/jsguide.html)
2828

2929
The version of `prettier` used is 1.18.2.
@@ -33,22 +33,14 @@ a change. However, it is not a strict requirement enforced by CI.
3333

3434
## Deploying
3535

36-
Each time a CL is reviewed and submitted, the blog is automatically deployed to App Engine.
37-
If the CL is submitted with a Website-Publish +1 vote,
38-
the new deployment automatically becomes https://go.dev/.
39-
Otherwise, the new deployment can be found in the
40-
[App Engine versions list](https://console.cloud.google.com/appengine/versions?project=golang-org&serviceId=default) and verified and manually promoted.
41-
42-
If the automatic deployment is not working, or to check on the status of a pending deployment,
43-
see the “website-redeploy-go-dev” trigger in the
44-
[Cloud Build console](https://console.cloud.google.com/cloud-build/builds?project=golang-org).
36+
Each time a CL is reviewed and submitted, the code is deployed to App Engine.
37+
See [cmd/golangorg/README.md](cmd/golangorg/README.md#deploying-to-go_dev-and-golang_org) for details.
4538

4639
## Report Issues / Send Patches
4740

4841
This repository uses Gerrit for code changes. To learn how to submit changes to
49-
this repository, see https://golang.org/doc/contribute.html.
42+
this repository, see https://go.dev/doc/contribute.
5043

5144
The main issue tracker for the website repository is located at
5245
https://github.com/golang/go/issues. Prefix your issue with "x/website:" in the
5346
subject line, so it is easy to find.
54-

cmd/golangorg/README.md

Lines changed: 19 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,30 @@ http://localhost:6060/go.dev/blog.
88

99
go run .
1010

11-
## Deploying to golang.org
11+
## Testing
12+
13+
The go.dev and golang.org web sites have a suite of regression tests that can be run with:
14+
15+
go test golang.org/x/website/...
16+
17+
Test cases that check for expected URLs, content, response codes and so on are
18+
encoded in \*.txt files in the `testdata` directory. If there is a problem that
19+
no existing test caught, it can be a good idea to add a new test case to avoid
20+
repeat regressions.
21+
22+
These tests can be run locally, via TryBots, and they are also run when
23+
new versions are being deployed. The `testdata/live.txt` file is special
24+
and used only when testing a live server, because its test cases depend
25+
on production resources.
26+
27+
## Deploying to go.dev and golang.org
1228

1329
Each time a CL is reviewed and submitted, the site is automatically deployed to App Engine.
1430
If the CL is submitted with a Website-Publish +1 vote,
15-
the new deployment automatically becomes https://golang.org/.
31+
the new deployment automatically becomes https://go.dev/.
1632
Otherwise, the new deployment can be found in the
1733
[App Engine versions list](https://console.cloud.google.com/appengine/versions?project=golang-org&serviceId=default) and verified and manually promoted.
1834

1935
If the automatic deployment is not working, or to check on the status of a pending deployment,
2036
see the “website-redeploy-golang-org” trigger in the
21-
[Cloud Build console](https://console.cloud.google.com/cloud-build/builds?project=golang-org).
37+
[Cloud Build console](https://console.cloud.google.com/cloud-build/builds?project=golang-org&query=trigger_id%3D%222399003e-0cc5-4877-86de-8bc8f13fd984%22).

tour/README.md

Lines changed: 10 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -8,32 +8,26 @@ https://go.dev/tour/ to start the tour.
88
## Download/Install
99

1010
To install the tour from source, first
11-
[install Go](https://golang.org/doc/install) and then run:
11+
[install Go](https://go.dev/doc/install) and then run:
1212

13-
$ go install golang.org/x/website/tour@latest
13+
go install golang.org/x/website/tour@latest
1414

1515
This will place a `tour` binary in your
16-
[GOPATH](https://golang.org/cmd/go/#hdr-GOPATH_and_Modules)'s `bin` directory.
16+
[GOPATH](https://go.dev/cmd/go/#hdr-GOPATH_and_Modules)'s `bin` directory.
1717
The tour program can be run offline.
1818

19-
## Contributing
19+
## Send Patches
2020

21-
Contributions should follow the same procedure as for the Go project:
22-
https://golang.org/doc/contribute.html
21+
This repository uses Gerrit for code changes. To learn how to submit changes to
22+
this repository, see https://go.dev/doc/contribute.
2323

2424
To run the tour server locally:
2525

26-
```sh
27-
go run .
28-
```
26+
go run .
2927

3028
Your browser should now open. If not, please visit [http://localhost:3999/](http://localhost:3999).
3129

32-
33-
## Report Issues / Send Patches
34-
35-
This repository uses Gerrit for code changes. To learn how to submit changes to
36-
this repository, see https://golang.org/doc/contribute.html.
30+
## Report Issues
3731

3832
The issue tracker for the tour's code is located at https://github.com/golang/go/issues.
3933
Prefix your issue with "x/website/tour:" in the subject line, so it is easy to find.
@@ -44,7 +38,8 @@ at https://github.com/golang/tour/issues.
4438
## Deploying
4539

4640
Each time a CL is reviewed and submitted, the tour is automatically deployed to App Engine
47-
as part of the main go.dev web site. See [../README.md](../README.md) for details.
41+
as part of the main go.dev web site.
42+
See [../cmd/golangorg/README.md](../cmd/golangorg/README.md#deploying-to-go_dev-and-golang_org) for details.
4843

4944
## License
5045

0 commit comments

Comments
 (0)