diff --git a/.github/workflows/build-docs.yml b/.github/workflows/build-docs.yml index 0d92d1feb3..6400691533 100644 --- a/.github/workflows/build-docs.yml +++ b/.github/workflows/build-docs.yml @@ -68,7 +68,7 @@ jobs: - uses: actions/upload-artifact@v3 with: name: docs-zip - path: ./docs.zip + path: ./site/docs.zip - name: Deploy to Netlify uses: nwtgck/actions-netlify@v1.1.5 with: diff --git a/.github/workflows/preview-docs.yml b/.github/workflows/preview-docs.yml index 10e44328d6..3550a9b441 100644 --- a/.github/workflows/preview-docs.yml +++ b/.github/workflows/preview-docs.yml @@ -11,6 +11,10 @@ jobs: runs-on: ubuntu-20.04 steps: - uses: actions/checkout@v3.1.0 + - name: Clean site + run: | + rm -rf ./site + mkdir ./site - name: Download Artifact Docs uses: dawidd6/action-download-artifact@v2.24.2 with: @@ -18,9 +22,10 @@ jobs: workflow: build-docs.yml run_id: ${{ github.event.workflow_run.id }} name: docs-zip + path: ./site/ - name: Unzip docs run: | - rm -rf ./site + cd ./site unzip docs.zip rm -f docs.zip - name: Deploy to Netlify diff --git a/docs/release-notes.md b/docs/release-notes.md index f7c2f559b8..4a4788f3bd 100644 --- a/docs/release-notes.md +++ b/docs/release-notes.md @@ -2,6 +2,7 @@ ## Latest Changes +* 👷 Refactor CI artifact upload/download for docs previews. PR [#514](https://github.com/tiangolo/sqlmodel/pull/514) by [@tiangolo](https://github.com/tiangolo). * ✏️ Fix typo in internal function name `get_sqlachemy_type()`. PR [#496](https://github.com/tiangolo/sqlmodel/pull/496) by [@cmarqu](https://github.com/cmarqu). * ⬆ Bump actions/cache from 2 to 3. PR [#497](https://github.com/tiangolo/sqlmodel/pull/497) by [@dependabot[bot]](https://github.com/apps/dependabot). * ✏️ Fix typo in docs. PR [#446](https://github.com/tiangolo/sqlmodel/pull/446) by [@davidbrochart](https://github.com/davidbrochart). diff --git a/scripts/zip-docs.sh b/scripts/zip-docs.sh index f2b7ba3be3..69315f5ddd 100644 --- a/scripts/zip-docs.sh +++ b/scripts/zip-docs.sh @@ -3,7 +3,9 @@ set -x set -e +cd ./site + if [ -f docs.zip ]; then rm -rf docs.zip fi -zip -r docs.zip ./site +zip -r docs.zip ./