Skip to content

Commit 28c0d63

Browse files
committed
wip
1 parent d347d8f commit 28c0d63

File tree

2 files changed

+27
-21
lines changed

2 files changed

+27
-21
lines changed

Makefile

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ COMPOSE_BUILD_BASE = docker compose build base
88
COMPOSE_RUN_CI = COMPOSE_ENVFILE=.env docker compose run --rm ci
99
COMPOSE_UP_CI = COMPOSE_ENVFILE=.env docker compose up ci -d
1010
COMPOSE_RUN_DEV = COMPOSE_ENVFILE=.env docker compose run --service-ports --rm dev
11-
COMPOSE_UP_DEV = COMPOSE_ENVFILE=$(ENVFILE) docker compose up dev
11+
COMPOSE_UP_DEV = COMPOSE_ENVFILE=.env docker compose up dev
1212

1313
ASTRO_URL ?= http://ci:4321
1414
# ENVFILE ?= $(if $(wildcard .env),.env,env.template)
@@ -36,14 +36,10 @@ copyDepsToHost:
3636
docker compose cp ci:/opt/app/vendor .
3737
docker compose rm -f ci
3838

39-
deploy:
40-
git rev-parse --is-shallow-repository
41-
git rev-list --count HEAD
42-
# cat dist/about/what-is-3musketeers/index.html | grep "Last updated"
43-
4439
fmt \
4540
check \
4641
build \
42+
deploy \
4743
toc \
4844
update:
4945
$(COMPOSE_RUN_CI) deno task $@
@@ -69,10 +65,14 @@ testPreview:
6965
$(COMPOSE_RUN_CI) make _testPreview ASTRO_URL=$(ASTRO_URL)
7066

7167
_testPreview:
68+
$(info Ensure .git is not shallow)
69+
git rev-parse --is-shallow-repository | grep false
7270
$(info Test home page)
7371
curl $(ASTRO_URL) | grep "Get started" > /dev/null
7472
$(info Test Getting started)
7573
curl $(ASTRO_URL)/guides/getting-started/ | grep "Getting Started" > /dev/null
74+
$(info Ensure presence of `Last updated` field)
75+
curl $(ASTRO_URL)/guides/getting-started/ | grep "Last updated" > /dev/null
7676

7777
# clean removes everything that has been created
7878
# It also deletes the deps folders, that could've been copied to the host (`make copyDepsToHost`), with `busybox` service as it does not mount them with volumens.

deno.jsonc

Lines changed: 21 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,20 +10,20 @@
1010
// TODO:
1111
// - Add `astro check` to the task `check`
1212
"tasks": {
13-
"toc": {
14-
"command": "deno run --cached-only -P=toc --no-prompt doctoc README.md --notitle"
15-
},
16-
"astro": {
17-
"command": "DENO_COMPAT=1 deno run --cached-only -P=astro --no-prompt astro $ASTRO_CMD"
18-
},
19-
"dev": "ASTRO_CMD='dev --host 0.0.0.0' deno task astro",
20-
"build": "rm -fr dist && ASTRO_CMD='build --debug --verbose' deno task astro",
21-
"preview": "ASTRO_CMD='preview --host=0.0.0.0 --allowed-hosts=ci,dev' deno task astro",
22-
"fmt": "deno fmt",
23-
"check": "deno check --no-remote --doc && deno lint && deno fmt --check",
2413
"install": "deno install --quiet --allow-scripts=npm:sharp",
2514
"outdated": "deno outdated",
2615
"update": "deno outdated --update --latest",
16+
"fmt": "deno fmt",
17+
"check": "deno check --no-remote --doc && deno lint && deno fmt --check",
18+
"toc": "deno run --cached-only -P=toc --no-prompt doctoc README.md --notitle",
19+
"astro": "DENO_COMPAT=1 deno run --cached-only -P=astro --no-prompt astro $ASTRO_CMD",
20+
"dev": "ASTRO_CMD='dev --host 0.0.0.0' deno task astro",
21+
"build": "rm -fr dist && DEBUG=\"starlight*\" ASTRO_CMD='build' deno task astro",
22+
"build:debug": {
23+
"description": "deno task build:debug >& debug.log",
24+
"command": "DEBUG=\"astro:*,vite:*\" ASTRO_CMD='build --verbose >& debug.log' deno task astro"
25+
},
26+
"preview": "ASTRO_CMD='preview --host=0.0.0.0 --allowed-hosts=ci,dev' deno task astro",
2727
"deploy": "deno run -P=wrangler wrangler pages deploy dist --project-name=\"$ENV_CLOUDFLARE_PROJECT_NAME\" --branch=\"$ENV_CLOUDFLARE_BRANCH_NAME\" --commit-message=\"Deploy\"",
2828
"deploy:list": "deno run -P=wrangler wrangler pages project list",
2929
"deploy:create": "deno run -P=wrangler wrangler pages project create \"$ENV_CLOUDFLARE_PROJECT_NAME\" --production-branch=\"$ENV_CLOUDFLARE_BRANCH_NAME\"",
@@ -32,10 +32,16 @@
3232
"permissions": {
3333
"astro": {
3434
"env": true,
35-
// For some reasons, Astro needs access to /proc/version, /opt, and /
36-
"read": [
37-
"/"
38-
],
35+
"read": {
36+
// For some reasons, Astro needs access to /proc/version, /opt, and /
37+
"allow": [
38+
"/"
39+
],
40+
// Something is not working when habing a `deny`. Not sure if it is a Deno bug.
41+
// "deny": [
42+
// ".env*"
43+
// ]
44+
},
3945
"write": [
4046
"/opt/app/.astro",
4147
"/opt/app/node_modules/.astro",

0 commit comments

Comments
 (0)