File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11version : 2.1
22jobs :
3- build :
3+ build_website :
44 docker :
55 - image : cimg/node:lts
6- working_directory : ~/repo
76 steps :
87 - checkout
98 - run :
109 name : Install dependencies
1110 command : npm ci
12-
1311 - run :
1412 name : Build site
1513 command : npm run build
16-
1714 - run :
1815 name : Patch asset paths for artifact viewer
1916 # Astro emits processed assets at absolute /_astro/ paths. In CircleCI's
@@ -22,16 +19,15 @@ jobs:
2219 # already resolve correctly and need no changes.
2320 command : |
2421 node scripts/circleci-preview.mjs \
25- "/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/0 /html"
22+ "/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/${CIRCLE_NODE_INDEX} /html"
2623 - store_artifacts :
2724 path : html
2825 destination : html
29-
3026 - run :
3127 name : " Preview URL"
3228 command : echo "https://output.circle-artifacts.com/output/job/${CIRCLE_WORKFLOW_JOB_ID}/artifacts/${CIRCLE_NODE_INDEX}/html/index.html"
3329
3430workflows :
35- build_website :
31+ preview_website :
3632 jobs :
37- - build
33+ - build_website
Original file line number Diff line number Diff line change 11[ tool .gilesbot ]
2- [ tool .gilesbot .circleci_artifacts .build ]
2+ [ tool .gilesbot .circleci_artifacts .preview_website ]
33 url = " html/index.html"
44 message = " Preview the website build."
You can’t perform that action at this time.
0 commit comments