Skip to content

Commit

Permalink
Move and rename deploy/public to build
Browse files Browse the repository at this point in the history
  • Loading branch information
colinrotherham committed Jan 2, 2024
1 parent bcaf4ef commit da36ab4
Show file tree
Hide file tree
Showing 10 changed files with 17 additions and 12 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ jobs:

with:
key: build-cache-${{ runner.os }}-${{ github.sha }}
path: deploy/public
path: build

- name: Setup Node.js
uses: actions/[email protected]
Expand Down Expand Up @@ -105,7 +105,7 @@ jobs:
uses: actions/cache/[email protected]
with:
key: build-cache-${{ runner.os }}-${{ github.sha }}
path: deploy/public
path: build

- name: Run task
id: task
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
deploy/public
build/
node_modules/
*.log
.DS_Store
Expand Down
2 changes: 1 addition & 1 deletion .htmlvalidateignore
Original file line number Diff line number Diff line change
@@ -1 +1 @@
deploy/public/components/*/*/index.html
build/components/*/*/index.html
3 changes: 1 addition & 2 deletions .prettierignore
Original file line number Diff line number Diff line change
Expand Up @@ -8,8 +8,7 @@ node_modules/
coverage/

# Build output
deploy/public/
**/fixtures/build/
build/

# Files to ignore
package-lock.json
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ npm start

## Build

Build `./src` to `./deploy/public`
Build `./src` to `./build`

```shell
npm run build
Expand Down
2 changes: 1 addition & 1 deletion config/paths.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const rootPath = resolve(__dirname, '../')
*/
module.exports = {
root: rootPath,
public: join(rootPath, 'deploy/public'),
public: join(rootPath, 'build'),
source: join(rootPath, 'src'),
views: join(rootPath, 'views')
}
2 changes: 1 addition & 1 deletion docs/deployment.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
The Design System is a static site which is generated by
[Metalsmith](http://www.metalsmith.io/) and hosted on Netlify.

Netlify runs `npm run build` and deploys the contents of the `deploy` directory.
Netlify runs `npm run build` and deploys the contents of the `build` directory.

This deployment happens outside of GitHub Actions, which means that deploys
happen in parallel with the tests running. However, Netlify will only deploy if
Expand Down
6 changes: 6 additions & 0 deletions netlify.toml
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# Override default `deploy/public` build directory used by legacy branches
# https://app.netlify.com/sites/govuk-design-system-preview/configuration/deploys

[build]
publish = "build"

# A number of the examples in the Design System include <form> elements so that
# users copying the examples have something that requires relatively little
# tweaking to work out the box (in particular Prototype Kit users, for example)
Expand Down
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -22,15 +22,15 @@
"lint": "npm run lint:editorconfig && npm run lint:prettier && npm run lint:js && npm run lint:types && npm run lint:scss && npm run lint:html --ignore-scripts",
"prelint:html": "npm run build",
"lint:editorconfig": "editorconfig-checker",
"lint:html": "html-validate \"deploy/public/**/index.html\"",
"lint:html": "html-validate \"build/**/index.html\"",
"lint:js": "npm run lint:js:cli -- \"**/*.{cjs,js,md,mjs}\"",
"lint:js:cli": "eslint --cache --cache-location .cache/eslint --cache-strategy content --color --ignore-path .gitignore",
"lint:prettier": "npm run lint:prettier:cli -- \"**/*.{cjs,js,json,md,mjs,scss,yaml,yml}\"",
"lint:prettier:cli": "prettier --cache --cache-location .cache/prettier --cache-strategy content --check",
"lint:scss": "npm run lint:scss:cli -- \"**/*.{md,scss}\"",
"lint:scss:cli": "stylelint --cache --cache-location .cache/stylelint --cache-strategy content --color --ignore-path .gitignore --max-warnings 0",
"lint:types": "tsc --build tsconfig.json",
"check-links": "hyperlink --canonicalroot https://design-system.service.gov.uk/ --internal --recursive deploy/public/sitemap.xml | tee check-links.log | tap-mocha-reporter min"
"check-links": "hyperlink --canonicalroot https://design-system.service.gov.uk/ --internal --recursive build/sitemap.xml | tee check-links.log | tap-mocha-reporter min"
},
"dependencies": {
"accessible-autocomplete": "^2.0.4",
Expand Down
2 changes: 1 addition & 1 deletion stylelint.config.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
module.exports = {
extends: 'stylelint-config-gds/scss',
ignoreFiles: ['**/?(.)*.{cjs,js,mjs}', 'deploy/public/**/*'],
ignoreFiles: ['**/?(.)*.{cjs,js,mjs}', 'build/**/*'],
overrides: [
{
customSyntax: 'postcss-markdown',
Expand Down

0 comments on commit da36ab4

Please sign in to comment.