mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-12-24 01:42:10 +00:00
CI: don't install packages globally
Install bins into ~/bin instead and use local npm packages
This commit is contained in:
parent
b48bd871a7
commit
e989ff01c4
5 changed files with 31 additions and 7 deletions
|
@ -19,10 +19,11 @@ tasks:
|
|||
- deps: |
|
||||
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
||||
rsync deploy@seirdy.one:/home/deploy/binaries.tar.gz .
|
||||
tar x -ozC /bin -f binaries.tar.gz
|
||||
npm i -g npm pnpm
|
||||
pnpm i -g @lhci/cli hint @hint/configuration-web-recommended @hint/hint-doctype @hint/hint-https-only @hint/hint-performance-budget @hint/formatter-codeframe
|
||||
mkdir -p ~/bin
|
||||
tar x -ozC ~/bin -f binaries.tar.gz
|
||||
- build_deploy: |
|
||||
cd seirdy.one
|
||||
npm i -D
|
||||
export PATH=~/bin:$PATH
|
||||
make DOMAIN=staging.seirdy.one test-staging
|
||||
make clean deploy
|
||||
|
|
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -4,5 +4,6 @@ hint-report/
|
|||
.hintrc-*
|
||||
*.report.html
|
||||
*.report.json
|
||||
.lighthouseci
|
||||
lighthouse-reports
|
||||
.lighthouseci/*
|
||||
lighthouse-reports/*
|
||||
node_modules/*
|
||||
|
|
|
@ -19,6 +19,7 @@ ci:
|
|||
works-offline: "off" # not a PWA. Use caching.
|
||||
is-crawlable: "off" # staging server won't be indexed
|
||||
timing-budget: "off" # buggy; manually use the below assertions instead
|
||||
canonical: "off" # staging server doesn't have canonical
|
||||
speed-index:
|
||||
- warn
|
||||
- maxNumericValue: 3000
|
||||
|
|
4
Makefile
4
Makefile
|
@ -84,8 +84,8 @@ deploy: deploy-html deploy-gemini
|
|||
## stuff for the staging server
|
||||
.PHONY: test-staging
|
||||
test-staging: deploy-html
|
||||
yq e '.ci .collect .url | .[]' .lighthouserc.yml | xargs hint -f codeframe
|
||||
lhci autorun
|
||||
yq e '.ci .collect .url | .[]' .lighthouserc.yml | xargs npx hint -f codeframe
|
||||
npx lhci autorun
|
||||
|
||||
.PHONY: all
|
||||
all: test deploy
|
||||
|
|
21
package.json
Normal file
21
package.json
Normal file
|
@ -0,0 +1,21 @@
|
|||
{
|
||||
"name": "seirdy.one",
|
||||
"scripts": {
|
||||
"test": "echo \"Error: no test specified\" && exit 1"
|
||||
},
|
||||
"repository": {
|
||||
"type": "git",
|
||||
"url": "git@git.sr.ht:~seirdy/seirdy.one"
|
||||
},
|
||||
"author": "",
|
||||
"license": "MIT",
|
||||
"devDependencies": {
|
||||
"@hint/configuration-web-recommended": "^8.1.0",
|
||||
"@hint/formatter-codeframe": "^3.1.19",
|
||||
"@hint/hint-doctype": "^3.3.7",
|
||||
"@hint/hint-https-only": "^2.4.7",
|
||||
"@hint/hint-performance-budget": "^2.4.7",
|
||||
"@lhci/cli": "^0.6.1",
|
||||
"hint": "^6.1.1"
|
||||
}
|
||||
}
|
Loading…
Reference in a new issue