Skip to content

Commit e683868

Browse files
committed
Add provision NPM script. Add build status to footer. Update readme with additional and simplified examples.
1 parent fdedacf commit e683868

File tree

9 files changed

+55
-37
lines changed

9 files changed

+55
-37
lines changed

.github/workflows/deploy.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
name: Deploy
1+
name: Build
22

33
on:
44
workflow_run:

README.md

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# dangibbs.uk
22

3+
![Build](https://github.com/gibbs/gibbs.github.io/actions/workflows/deploy.yml/badge.svg)
34
![Tests](https://github.com/gibbs/gibbs.github.io/actions/workflows/test.yml/badge.svg)
45

56
Dan Gibbs's personal website repository built with
@@ -14,12 +15,16 @@ npm run build
1415
## Develop
1516

1617
```bash
17-
APP_URL="http://localhost:8080" npm run serve
18+
npm run serve
1819
```
1920

20-
## Test
21+
## Lint
2122

22-
Run all tests:
23+
```bash
24+
npm run lint
25+
```
26+
27+
## Test
2328

2429
```bash
2530
npm run test

package-lock.json

Lines changed: 34 additions & 31 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,14 +7,15 @@
77
"node": ">=16"
88
},
99
"scripts": {
10-
"build": "run-s build:*",
10+
"build": "run-s provision build:*",
1111
"build:assets": "APP_ENV=production webpack --mode production",
1212
"build:site": "APP_ENV=production npx @11ty/eleventy",
1313
"debug": "DEBUG=* npx @11ty/eleventy",
1414
"lint": "run-s lint:*",
1515
"lint:js": "eslint '**/*.js' || true",
1616
"lint:yaml": "eslint content/**/*.yaml || true",
17-
"serve": "APP_URL=${APP_URL:-\"http://localhost:8080\"} run-p serve:*",
17+
"serve": "APP_URL=${APP_URL:-\"http://localhost:8080\"} run-p provision serve:*",
18+
"provision": "mkdirp docs/assets/images/scaled/",
1819
"serve:assets": "APP_ENV=${APP_ENV:-development} webpack --mode ${APP_ENV:-development} --watch",
1920
"serve:build": "APP_ENV=${APP_ENV:-development} APP_URL=${APP_URL:-\"http://localhost:8080\"} npx @11ty/eleventy",
2021
"serve:watch": "APP_ENV=${APP_ENV:-development} APP_URL=${APP_URL:-\"http://localhost:8080\"} npx @11ty/eleventy --serve --port ${APP_PORT:-8080}",
@@ -56,6 +57,7 @@
5657
"markdown-it-attrs": "^4.1.0",
5758
"markdown-it-mark": "^3.0.1",
5859
"mini-css-extract-plugin": "^2.4.4",
60+
"mkdirp": "^1.0.4",
5961
"mocha": "^9.2.0",
6062
"modern-normalize": "^1.1.0",
6163
"npm-run-all": "^4.1.5",

src/_includes/footer.njk

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,10 @@
5858
Cookie Preferences
5959
</a>
6060

61+
<a href="https://github.com/gibbs/gibbs.github.io/" class="copyright__test-status">
62+
<img src="https://github.com/gibbs/gibbs.github.io/actions/workflows/deploy.yml/badge.svg" width="115" height="20" alt="Build Status">
63+
</a>
64+
6165
<a href="https://github.com/gibbs/gibbs.github.io/" class="copyright__test-status">
6266
<img src="https://github.com/gibbs/gibbs.github.io/actions/workflows/test.yml/badge.svg" width="107" height="20" alt="Test Status">
6367
</a>

src/assets/css/_document.scss

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -208,6 +208,8 @@ body {
208208
align-self: center;
209209
margin: 0;
210210
font-size: small;
211+
flex-direction: column;
212+
gap: var(--spacer);
211213

212214
a {
213215
padding: 0 calc(var(--gutter-width) * .25);
@@ -241,6 +243,8 @@ body {
241243

242244
.copyright__test-status {
243245
justify-content: flex-end;
246+
flex-direction: row;
247+
gap: unset;
244248
}
245249
}
246250

src/assets/icons/apple-touch-icon.png

-5.14 KB
Loading

src/assets/icons/icon-192.png

-4.79 KB
Loading

src/assets/icons/icon-512.png

-5.13 KB
Loading

0 commit comments

Comments
 (0)