chore(docs): set up auto build & deploy
This commit is contained in:
parent
b5bd559e35
commit
19240d79c7
2 changed files with 40 additions and 1 deletions
38
.build.yml
Normal file
38
.build.yml
Normal file
|
@ -0,0 +1,38 @@
|
||||||
|
image: alpine/edge
|
||||||
|
packages:
|
||||||
|
- nodejs
|
||||||
|
- npm
|
||||||
|
- pnpm
|
||||||
|
secrets:
|
||||||
|
- 291f0e35-9b8d-43ff-844c-77c5f29c1876
|
||||||
|
- bbfcb6dc-7c4a-42ee-a11a-022f0339a133
|
||||||
|
environment:
|
||||||
|
NETLIFY_SITE_ID: 390b392a-a898-491b-8500-79aa30f724d6
|
||||||
|
GH_USER: ayoayco
|
||||||
|
REPO: wcb
|
||||||
|
tasks:
|
||||||
|
- push-mirror: |
|
||||||
|
cd ~/"${REPO}"
|
||||||
|
git config --global credential.helper store
|
||||||
|
git push --mirror "https://github.com/${GH_USER}/${REPO}"
|
||||||
|
- install-deps: |
|
||||||
|
cd ~/"${REPO}"
|
||||||
|
pnpm i --ignore-scripts
|
||||||
|
- test: |
|
||||||
|
cd ~/"${REPO}"
|
||||||
|
npx vitest run
|
||||||
|
- build: |
|
||||||
|
cd ~/"${REPO}"
|
||||||
|
pnpm -F ./packages/core build
|
||||||
|
pnpm -F ./packages/config build
|
||||||
|
pnpm -F docs i --ignore-scripts
|
||||||
|
pnpm -F docs build
|
||||||
|
- deploy: |
|
||||||
|
cd wcb
|
||||||
|
{
|
||||||
|
set +x
|
||||||
|
. ~/.buildsecrets
|
||||||
|
set -x
|
||||||
|
}
|
||||||
|
export NETLIFY_AUTH_TOKEN
|
||||||
|
pnpm -F docs run deploy
|
|
@ -7,7 +7,8 @@
|
||||||
"start": "astro dev",
|
"start": "astro dev",
|
||||||
"build": "astro build",
|
"build": "astro build",
|
||||||
"preview": "astro preview",
|
"preview": "astro preview",
|
||||||
"astro": "astro"
|
"astro": "astro",
|
||||||
|
"deploy": "netlify deploy --site=$NETLIFY_SITE_ID --dir=dist --prod"
|
||||||
},
|
},
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@astrojs/starlight": "^0.32.5",
|
"@astrojs/starlight": "^0.32.5",
|
||||||
|
|
Loading…
Reference in a new issue