mirror of
https://github.com/Websoft9/websoft9.git
synced 2024-11-21 23:20:23 +00:00
delete apidocs release
This commit is contained in:
parent
5e87dcf872
commit
e67c39f0fc
1 changed files with 0 additions and 64 deletions
64
.github/workflows/release.yml
vendored
64
.github/workflows/release.yml
vendored
|
@ -83,70 +83,6 @@ jobs:
|
|||
draft: false
|
||||
prerelease: false
|
||||
|
||||
|
||||
apidocs:
|
||||
needs: upload_artifact
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
name: Check out code
|
||||
|
||||
- name: Get version
|
||||
run: |
|
||||
version=$(grep -Po '(?<=LABEL version=").*?(?=")' docker/apphub/Dockerfile)
|
||||
echo $version
|
||||
real_version=${version%%-*}
|
||||
echo "VERSION=$version" >> $GITHUB_ENV
|
||||
|
||||
- name: Download redoc.standalone.js
|
||||
run: wget -O apphub/apidocs/redoc.standalone.js https://cdn.redoc.ly/redoc/latest/bundles/redoc.standalone.js
|
||||
|
||||
- name: Run Docker container and get openapi.json
|
||||
run: |
|
||||
docker run -d --name apphub -p 8080:8080 websoft9dev/apphub:${{ env.VERSION }}
|
||||
sleep 5
|
||||
max_attempts=10
|
||||
url="http://localhost:8080/openapi.json"
|
||||
for attempt in $(seq 1 $max_attempts); do
|
||||
echo "Attempt #$attempt to download $url..."
|
||||
if wget -O apphub/apidocs/openapi.json "$url"; then
|
||||
echo "Successfully downloaded $url"
|
||||
break
|
||||
else
|
||||
echo "Failed to download $url. Waiting for 5 seconds before retry..."
|
||||
sleep 5
|
||||
fi
|
||||
done
|
||||
|
||||
- name: Prepare apidocs content
|
||||
run: |
|
||||
mkdir -p apidocs
|
||||
cp -r apphub/apidocs/* apidocs/
|
||||
|
||||
- name: Compress apidocs content
|
||||
run: |
|
||||
zip -r apidocs.zip apidocs
|
||||
|
||||
- name: Deploy apidocs content to Cloudflare Pages Dev Environment
|
||||
run: |
|
||||
curl -X POST "https://api.cloudflare.com/client/v4/accounts/eb79f13320db531d8cf1f3720966b695/pages/projects/doc-websoft9-com/deployments" \
|
||||
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_API_TOKEN }}" \
|
||||
-F "file=@apidocs.zip" \
|
||||
-F "branch=dev"
|
||||
|
||||
# - name: Publish to Cloudflare Pages
|
||||
# uses: cloudflare/pages-action@v1
|
||||
# with:
|
||||
# apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
|
||||
# accountId: eb79f13320db531d8cf1f3720966b695
|
||||
# projectName: doc-websoft9-com
|
||||
# directory: apphub/apidocs
|
||||
# # Optional: Enable this if you want to have GitHub Deployments triggered
|
||||
# gitHubToken: ${{ secrets.GITHUB_TOKEN }}
|
||||
# # Optional: Switch what branch you are publishing to.
|
||||
# # By default this will be the branch which triggered this workflow
|
||||
# branch: dev
|
||||
pages:
|
||||
name: Build Github Pages
|
||||
permissions:
|
||||
|
|
Loading…
Reference in a new issue