Fold lint into build job to avoid duplicate dependency install
This commit is contained in:
1 parent
c049512b92
commit
b0c62de391
2 files changed
+17
-31
No files matched your search
@@ -87,19 +87,21 @@ git commit -m "new post"
|
||||
git push origin master
|
||||
```
|
||||
|
||||
The [deploy workflow](.gitea/workflows/deploy.yml) runs four gated stages:
|
||||
The [deploy workflow](.gitea/workflows/deploy.yml) runs three gated stages:
|
||||
|
||||
1. **lint** — checks all Markdown in `source/` and `scaffolds/` with
|
||||
`markdownlint-cli2` (house style codified in `.markdownlint-cli2.jsonc`)
|
||||
2. **build** — checks out the repo, sets up Node 22, runs `yarn install
|
||||
--frozen-lockfile` and `hexo generate`, optimizes every PNG/JPEG in the
|
||||
built output with pngquant/oxipng/jpegoptim (~58% smaller images, originals
|
||||
in `source/` untouched), then uploads the site as a workflow artifact
|
||||
3. **test** — validates the built artifact without touching production:
|
||||
1. **build** — checks out the repo, sets up Node 22, and runs a single
|
||||
`yarn install --frozen-lockfile` that serves both jobs of this stage:
|
||||
first it lints all Markdown in `source/` and `scaffolds/` with
|
||||
`markdownlint-cli2` (house style codified in `.markdownlint-cli2.jsonc`;
|
||||
lint failures fail the stage), then runs `hexo generate` and optimizes
|
||||
every PNG/JPEG in the built output with pngquant/jpegoptim (~56% smaller
|
||||
images, originals in `source/` untouched). The site is uploaded as a
|
||||
workflow artifact
|
||||
2. **test** — validates the built artifact without touching production:
|
||||
structural checks (index, theme assets, file count) plus a serving smoke
|
||||
test that requests the homepage, a real post page, and the stylesheet
|
||||
over a local HTTP server
|
||||
4. **deploy** — only runs if lint, build, and test all passed; downloads the
|
||||
3. **deploy** — only runs if build and test both passed; downloads the
|
||||
tested artifact, writes an SSH deploy key from the `DEPLOY_KEY` secret,
|
||||
and `rsync -avz` over SSH (key-based only; the server rejects password
|
||||
auth) to `root@69.164.253.99:/www/wwwroot/leonxu260.dev/`
|
||||
|
||||
Reference in new issue
Block a user