Merge pull request #1831 from slumbering/netlify-package
replace yarn by npm to avoid plugin installation error
This commit is contained in:
commit
30cbc64d86
@ -22,9 +22,10 @@ create_site() {
|
|||||||
jq -r '.site_id' body
|
jq -r '.site_id' body
|
||||||
}
|
}
|
||||||
|
|
||||||
site_id=$(curl -s -S -f -H "Authorization: Bearer $NETLIFY_AUTH_TOKEN" \
|
site_id=$(
|
||||||
"https://api.netlify.com/api/v1/sites?filter=all" | \
|
curl -s -S -f -H "Authorization: Bearer $NETLIFY_AUTH_TOKEN" \
|
||||||
jq -r ".[] | select(.name==\"$NETLIFY_SITE_NAME\") | .id" \
|
"https://api.netlify.com/api/v1/sites?filter=all" |
|
||||||
|
jq -r ".[] | select(.name==\"$NETLIFY_SITE_NAME\") | .id"
|
||||||
)
|
)
|
||||||
if [ -z "$site_id" ]; then
|
if [ -z "$site_id" ]; then
|
||||||
if [ "${NETLIFY_SITE_CREATE:-}" != 1 ]; then
|
if [ "${NETLIFY_SITE_CREATE:-}" != 1 ]; then
|
||||||
@ -42,17 +43,16 @@ if [ -z "$site_id" ] ; then
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
netlify link --id "$site_id"
|
netlify link --id "$site_id"
|
||||||
netlify build
|
|
||||||
|
|
||||||
netlify deploy \
|
netlify deploy \
|
||||||
--dir="$(pwd)" \
|
--build \
|
||||||
--site="$site_id" \
|
--site="$site_id" \
|
||||||
--prod \
|
--prodIfUnlocked |
|
||||||
| tee /tmp/stdout
|
tee /tmp/stdout
|
||||||
|
|
||||||
url="$(</tmp/stdout grep Website | grep -Eo 'https://[^ >]+' | head -1)"
|
url="$(grep </tmp/stdout Website | grep -Eo 'https://[^ >]+' | head -1)"
|
||||||
deployUrl="$(</tmp/stdout grep Unique | grep -Eo 'https://[^ >]+' | head -1)"
|
deployUrl="$(grep </tmp/stdout Unique | grep -Eo 'https://[^ >]+' | head -1)"
|
||||||
logsUrl="$(</tmp/stdout grep Logs | grep -Eo 'https://[^ >]+' | head -1)"
|
logsUrl="$(grep </tmp/stdout Logs | grep -Eo 'https://[^ >]+' | head -1)"
|
||||||
|
|
||||||
# Write output files
|
# Write output files
|
||||||
mkdir -p /netlify
|
mkdir -p /netlify
|
||||||
|
@ -43,14 +43,14 @@ import (
|
|||||||
bash: {}
|
bash: {}
|
||||||
curl: {}
|
curl: {}
|
||||||
jq: {}
|
jq: {}
|
||||||
yarn: {}
|
npm: {}
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
// FIXME: make this an alpine custom package, that would be so cool.
|
// FIXME: make this an alpine custom package, that would be so cool.
|
||||||
docker.#Run & {
|
docker.#Run & {
|
||||||
command: {
|
command: {
|
||||||
name: "yarn"
|
name: "npm"
|
||||||
args: ["global", "add", "netlify-cli@8.6.21"]
|
args: ["-g", "install", "netlify-cli@8.6.21"]
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
|
Reference in New Issue
Block a user