Reduce verbosity of curl
in action runner
All checks were successful
Generate Website / Generate Website (push) Successful in 17s
All checks were successful
Generate Website / Generate Website (push) Successful in 17s
This commit is contained in:
parent
b6fa5bbf2c
commit
021c77f8a1
1 changed files with 20 additions and 9 deletions
|
@ -50,11 +50,16 @@ jobs:
|
|||
- name: Fetch suo binary
|
||||
shell: bash
|
||||
run: |
|
||||
POST_URL=https://git.sapphirus.org/api/packages/private/generic/suo/latest/suo
|
||||
POST_URL="https://git.sapphirus.org/api/packages/private/generic/suo/latest/suo"
|
||||
|
||||
echo "::group:: Fetching suo"
|
||||
mkdir ./bin/ && curl --user $USER_NAME:$USER_TOKEN $POST_URL --output ./bin/suo && chmod +x ./bin/suo
|
||||
echo "::endgroup::"
|
||||
mkdir ./bin/ &&
|
||||
curl --silent \
|
||||
--show-error \
|
||||
--user $USER_NAME:$USER_TOKEN $POST_URL \
|
||||
--output ./bin/suo &&
|
||||
chmod +x ./bin/suo
|
||||
echo "::endgroup::"
|
||||
- name: Generate website
|
||||
run: ./bin/suo && ./suo/dist/assets.sh ./output ./suo
|
||||
- name: Package website
|
||||
|
@ -68,18 +73,24 @@ jobs:
|
|||
- name: Upload package
|
||||
shell: bash
|
||||
run: |
|
||||
POST_URL=https://git.sapphirus.org/api/packages/private/generic/website/latest/
|
||||
POST_URL="https://git.sapphirus.org/api/packages/private/generic/website/latest/"
|
||||
SRC_DIR="./output/"
|
||||
FILES=$(ls $SRC_DIR*.tar.zst $SRC_DIR*.ver)
|
||||
FILES=$(ls "$SRC_DIR"*.tar.zst "$SRC_DIR"*.ver)
|
||||
|
||||
for file in $FILES; do
|
||||
echo "::group:: Removing $file"
|
||||
curl --user $USER_NAME:$USER_TOKEN -X DELETE $POST_URL${file##$SRC_DIR}
|
||||
echo -e "\n::endgroup::"
|
||||
curl --silent \
|
||||
--show-error \
|
||||
--user $USER_NAME:$USER_TOKEN \
|
||||
-X DELETE $POST_URL${file##$SRC_DIR}
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
||||
for file in $FILES; do
|
||||
echo "::group:: Publishing $file"
|
||||
curl --user $USER_NAME:$USER_TOKEN --upload-file $file $POST_URL${file##$SRC_DIR}
|
||||
echo -e "\n::endgroup::"
|
||||
curl --silent \
|
||||
--show-error \
|
||||
--user $USER_NAME:$USER_TOKEN \
|
||||
--upload-file $file $POST_URL${file##$SRC_DIR}
|
||||
echo "::endgroup::"
|
||||
done
|
||||
|
|
Loading…
Reference in a new issue