mirror of
https://git.sr.ht/~seirdy/seirdy.one
synced 2024-11-23 21:02:09 +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: |
|
- deps: |
|
||||||
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
echo "StrictHostKeyChecking=no" >> ~/.ssh/config
|
||||||
rsync deploy@seirdy.one:/home/deploy/binaries.tar.gz .
|
rsync deploy@seirdy.one:/home/deploy/binaries.tar.gz .
|
||||||
tar x -ozC /bin -f binaries.tar.gz
|
mkdir -p ~/bin
|
||||||
npm i -g npm pnpm
|
tar x -ozC ~/bin -f binaries.tar.gz
|
||||||
pnpm i -g @lhci/cli hint @hint/configuration-web-recommended @hint/hint-doctype @hint/hint-https-only @hint/hint-performance-budget @hint/formatter-codeframe
|
|
||||||
- build_deploy: |
|
- build_deploy: |
|
||||||
cd seirdy.one
|
cd seirdy.one
|
||||||
|
npm i -D
|
||||||
|
export PATH=~/bin:$PATH
|
||||||
make DOMAIN=staging.seirdy.one test-staging
|
make DOMAIN=staging.seirdy.one test-staging
|
||||||
make clean deploy
|
make clean deploy
|
||||||
|
|
5
.gitignore
vendored
5
.gitignore
vendored
|
@ -4,5 +4,6 @@ hint-report/
|
||||||
.hintrc-*
|
.hintrc-*
|
||||||
*.report.html
|
*.report.html
|
||||||
*.report.json
|
*.report.json
|
||||||
.lighthouseci
|
.lighthouseci/*
|
||||||
lighthouse-reports
|
lighthouse-reports/*
|
||||||
|
node_modules/*
|
||||||
|
|
|
@ -19,6 +19,7 @@ ci:
|
||||||
works-offline: "off" # not a PWA. Use caching.
|
works-offline: "off" # not a PWA. Use caching.
|
||||||
is-crawlable: "off" # staging server won't be indexed
|
is-crawlable: "off" # staging server won't be indexed
|
||||||
timing-budget: "off" # buggy; manually use the below assertions instead
|
timing-budget: "off" # buggy; manually use the below assertions instead
|
||||||
|
canonical: "off" # staging server doesn't have canonical
|
||||||
speed-index:
|
speed-index:
|
||||||
- warn
|
- warn
|
||||||
- maxNumericValue: 3000
|
- maxNumericValue: 3000
|
||||||
|
|
4
Makefile
4
Makefile
|
@ -84,8 +84,8 @@ deploy: deploy-html deploy-gemini
|
||||||
## stuff for the staging server
|
## stuff for the staging server
|
||||||
.PHONY: test-staging
|
.PHONY: test-staging
|
||||||
test-staging: deploy-html
|
test-staging: deploy-html
|
||||||
yq e '.ci .collect .url | .[]' .lighthouserc.yml | xargs hint -f codeframe
|
yq e '.ci .collect .url | .[]' .lighthouserc.yml | xargs npx hint -f codeframe
|
||||||
lhci autorun
|
npx lhci autorun
|
||||||
|
|
||||||
.PHONY: all
|
.PHONY: all
|
||||||
all: test deploy
|
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