Skip to content

Commit

Permalink
Merge pull request #9 from trade-tariff/BAU-updates
Browse files Browse the repository at this point in the history
BAU: More updates
  • Loading branch information
willfish authored Apr 10, 2024
2 parents 60382de + 33234a8 commit fcb2648
Show file tree
Hide file tree
Showing 11 changed files with 51 additions and 43 deletions.
7 changes: 5 additions & 2 deletions Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,15 @@
start: build
NO_CONTRACTS=true bundle exec middleman server

test:
test: check
bundle exec rake

build: clean
build: clean check
NO_CONTRACTS=true bundle exec middleman build

check:
bundle check || bundle install

clean:
rm -rf build; rm -rf .cache

Expand Down
43 changes: 27 additions & 16 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
# GOV.UK Developer Docs
# OTT Developer Docs

👉 https://docs.trade-tariff.service.gov.uk/
👉 https://docs.trade-tariff.service.gov.uk/ - production
👉 https://docs.staging.trade-tariff.service.gov.uk/ - staging
👉 https://docs.dev.trade-tariff.service.gov.uk/ - development

This is a static site generated with Middleman, using [alphagov/tech-docs-template](https://github.com/alphagov/tech-docs-template).

Expand All @@ -15,14 +17,14 @@ bundle install

## Run the tests locally

```
bundle exec rake
```sh
make test
```

## Run the app locally

```sh
SKIP_PROXY_PAGES=true ./startup.sh
SKIP_PROXY_PAGES=true make start
```

## Proxy pages
Expand All @@ -35,33 +37,40 @@ The app downloads these "proxy pages" at startup and this can cause GitHub to ra

1. Store the token in a `.env` file:

```sh
GITHUB_TOKEN=somethingsomething
```
```sh
export GITHUB_TOKEN=somethingsomething
```

1. Start the application:

```sh
./startup.sh
```
```sh
make start
```

## Update to the latest Tech Docs template

```sh
bin/update
make update-tech-docs
```

## Deployment

We host GOV.UK Developer Docs as a static site on GitHub Pages. The [ci.yml] GitHub Actions workflow updates the site automatically:
We host OTT Developer Docs as a static site in S3. The GitHub Actions workflows [development], [staging] and [production] updates the site automatically:

- when a PR is merged to the default branch
- when a PR is opened (releases to development)
- when a PR is merged (releases to development, staging and production - in order)
- on an hourly schedule, to pick up changes to docs included from other repos

### Build the static site locally

```sh
NO_CONTRACTS=true bundle exec middleman build
make build
```

### Run the static site locally

```sh
make
```

This will create a `build` directory containing a set of HTML files.
Expand All @@ -70,4 +79,6 @@ This will create a `build` directory containing a set of HTML files.

[MIT License](LICENCE)

[ci.yml]: /.github/workflows/ci.yml
[development]: /.github/workflows/development.yml
[staging]: /.github/workflows/staging.yml
[production]: /.github/workflows/production.yml
4 changes: 2 additions & 2 deletions app/external_doc.rb
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ def self.title(markdown)
# When we import external documentation it can contain relative links to
# source files within the repository that the documentation resides. We need
# to filter out these types of links and make them absolute so that they
# continue to work when rendered as part of GOV.UK Developer Docs.
# continue to work when rendered as part of OTT Developer Docs.
#
# For example a link to `lib/link_expansion.rb` would be rewritten to
# https://github.com/trade-tariff/publishing-api/blob/main/lib/link_expansion.rb
Expand Down Expand Up @@ -96,7 +96,7 @@ def call

# When we import external documentation formatted with Markdown it can
# contain links to other pages of documentation also formatted with Markdown.
# When the documentation is rendered as part of GOV.UK Developer Docs we
# When the documentation is rendered as part of OTT Developer Docs we
# render it as HTML so we need to rewrite the links so that they have a .html
# extension to match our routing.
#
Expand Down
2 changes: 1 addition & 1 deletion markdown_lint.rb
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@
# So, better to turn the rule off for now.
exclude_rule "list-indent"

# Some pages, such as the "Architectural deep-dive of GOV.UK", break into
# Some pages, such as the "Architectural deep-dive of OTT", break into
# sections which all follow the same format, e.g.
#
# ## Foo
Expand Down
8 changes: 4 additions & 4 deletions source/accessibility.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,9 +6,9 @@ hide_in_navigation: true

# Accessibility statement

This accessibility statement applies to the GOV.UK developer documentation at [https://docs.trade-tariff.service.gov.uk/](https://docs.trade-tariff.service.gov.uk/).
This accessibility statement applies to the OTT developer documentation at [https://docs.trade-tariff.service.gov.uk/](https://docs.trade-tariff.service.gov.uk/).

This website is run by the GOV.UK developer team at the Government Digital Service (GDS). We want as many people as possible to be able to use this website. For example, that means you should be able to:
This website is run by the OTT developer team at the Government Digital Service (GDS). We want as many people as possible to be able to use this website. For example, that means you should be able to:

- change colours, contrast levels and fonts
- zoom in up to 300% without the text spilling off the screen
Expand Down Expand Up @@ -36,13 +36,13 @@ There are also issues caused by our Technical Documentation Template.

## Feedback and contact information

If you need any part of this service in a different format like large print, audio recording or braille, [contact us using the GOV.UK contact form](https://www.gov.uk/contact/govuk).
If you need any part of this service in a different format like large print, audio recording or braille, [contact us using the OTT contact form](https://www.gov.uk/contact/govuk).

We’ll consider your request and get back to you within 5 working days.

## Reporting accessibility problems with this website

We’re always looking to improve the accessibility of this website. If you find any problems not listed on this page or think we’re not meeting accessibility requirements, [contact us using the GOV.UK contact form](https://www.gov.uk/contact/govuk).
We’re always looking to improve the accessibility of this website. If you find any problems not listed on this page or think we’re not meeting accessibility requirements, [contact us using the OTT contact form](https://www.gov.uk/contact/govuk).

### Enforcement procedure

Expand Down
2 changes: 1 addition & 1 deletion source/manual/browser-support.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ section: Frontend
type: learn
---

GOV.UK [shares the same browser support matrix with GOV.UK Frontend](https://github.com/alphagov/govuk-frontend#browser-and-assistive-technology-support) for pages served to the general public.
OTT [shares the same browser support matrix with GOV.UK Frontend](https://github.com/alphagov/govuk-frontend#browser-and-assistive-technology-support) for pages served to the general public.

If the application you are working on is aimed at internal users rather than the general public you should look at your analytics data and check which browsers your users are using. Then you can then make an informed decision about which browsers to test with.

Expand Down
2 changes: 1 addition & 1 deletion source/manual/deployments.html.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ layout: manual_layout
parent: "/manual.html"
---

On GOV.UK, all applications are set up for continuous deployment to integration, with the majority also having continuous deployment configured for staging and production. Additionally, you can manually deploy a git reference (tag, branch, or commit SHA) of an application to any environment.
On OTT, all applications are set up for continuous deployment to integration, with the majority also having continuous deployment configured for staging and production. Additionally, you can manually deploy a git reference (tag, branch, or commit SHA) of an application to any environment.

Continuous integration (CI) is run on new commits on the main branch, usually from merging a pull request. If the commits pass CI, they are automatically deployed to integration. After deployment, a set of smoke tests run in integration to verify that the application still works as expected.

Expand Down
4 changes: 2 additions & 2 deletions source/manual/dictionary.html.erb
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
---
title: Dictionary of concepts on GOV.UK
title: Dictionary of concepts on OTT
parent: /manual.html
layout: false
section: Learning GOV.UK
section: Learning OTT
type: learn
source_url: https://github.com/trade-tariff/govuk-developer-docs/blob/main/data/dictionary.yml
---
Expand Down
13 changes: 5 additions & 8 deletions source/partials/_intro.html.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,6 @@
This is the technical documentation for the [GOV.UK][] team in the [Government
Digital Service (GDS)][GDS]. For other projects built by GDS, see the [Service
Toolkit][]. For technical documentation applicable to GDS as a whole, see [The
GDS Way][GDS Way].
This is the technical documentation for the Online Trade Tariff team in [HM Revenue and Customs (HMRC)][HMRC].

[GDS]: https://gds.blog.gov.uk/about/
[GDS Way]: https://gds-way.digital.cabinet-office.gov.uk/
[GOV.UK]: https://www.gov.uk/
[Service Toolkit]: https://www.gov.uk/service-toolkit
For technical documentation applicable to OTT APIs, see [API docs][API].

[HMRC]: https://www.gov.uk/government/organisations/hm-revenue-customs
[API]: https://api.trade-tariff.service.gov.uk/
6 changes: 3 additions & 3 deletions source/repos.html.md.erb
Original file line number Diff line number Diff line change
@@ -1,10 +1,10 @@
---
title: All GOV.UK repositories
title: All OTT repositories
---

# All GOV.UK repositories
# All OTT repositories

GOV.UK maintains at least <%= Repos.active.size %> repositories including apps, services, gems and documentation.
OTT maintains at least <%= Repos.active.size %> repositories including apps, services, gems and documentation.

## Repos by type

Expand Down
3 changes: 0 additions & 3 deletions spec/pages/manual_page_spec.rb
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,6 @@
RSpec.describe filename do
raw = File.read(filename)
frontmatter = YAML.load(raw.split("---")[1])
it "uses the correct spelling of GOV.UK" do
expect(raw).not_to match "Gov.uk"
end

it "has an owner" do
expect(frontmatter["owner_slack"]).to be_present, "Page doesn't have `owner_slack` set"
Expand Down

0 comments on commit fcb2648

Please sign in to comment.