mirror of https://github.com/tiangolo/fastapi.git
👷 Refactor CI artifact upload/download for docs previews (#5793)
This commit is contained in:
parent
97f04ab58c
commit
9efab1bd96
|
|
@ -36,7 +36,7 @@ jobs:
|
||||||
- uses: actions/upload-artifact@v3
|
- uses: actions/upload-artifact@v3
|
||||||
with:
|
with:
|
||||||
name: docs-zip
|
name: docs-zip
|
||||||
path: ./docs.zip
|
path: ./site/docs.zip
|
||||||
- name: Deploy to Netlify
|
- name: Deploy to Netlify
|
||||||
uses: nwtgck/actions-netlify@v1.2.4
|
uses: nwtgck/actions-netlify@v1.2.4
|
||||||
with:
|
with:
|
||||||
|
|
|
||||||
|
|
@ -11,6 +11,10 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
- name: Clean site
|
||||||
|
run: |
|
||||||
|
rm -rf ./site
|
||||||
|
mkdir ./site
|
||||||
- name: Download Artifact Docs
|
- name: Download Artifact Docs
|
||||||
uses: dawidd6/action-download-artifact@v2.24.2
|
uses: dawidd6/action-download-artifact@v2.24.2
|
||||||
with:
|
with:
|
||||||
|
|
@ -18,9 +22,10 @@ jobs:
|
||||||
workflow: build-docs.yml
|
workflow: build-docs.yml
|
||||||
run_id: ${{ github.event.workflow_run.id }}
|
run_id: ${{ github.event.workflow_run.id }}
|
||||||
name: docs-zip
|
name: docs-zip
|
||||||
|
path: ./site/
|
||||||
- name: Unzip docs
|
- name: Unzip docs
|
||||||
run: |
|
run: |
|
||||||
rm -rf ./site
|
cd ./site
|
||||||
unzip docs.zip
|
unzip docs.zip
|
||||||
rm -f docs.zip
|
rm -f docs.zip
|
||||||
- name: Deploy to Netlify
|
- name: Deploy to Netlify
|
||||||
|
|
|
||||||
|
|
@ -3,7 +3,9 @@
|
||||||
set -x
|
set -x
|
||||||
set -e
|
set -e
|
||||||
|
|
||||||
|
cd ./site
|
||||||
|
|
||||||
if [ -f docs.zip ]; then
|
if [ -f docs.zip ]; then
|
||||||
rm -rf docs.zip
|
rm -rf docs.zip
|
||||||
fi
|
fi
|
||||||
zip -r docs.zip ./site
|
zip -r docs.zip ./
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue