👷 Refactor CI artifact upload/download for docs previews (#516)
This commit is contained in:
parent
e3f746793f
commit
0c106a169e
4 changed files with 11 additions and 4 deletions
2
.github/workflows/build-docs.yml
vendored
2
.github/workflows/build-docs.yml
vendored
|
@ -59,7 +59,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.2.4
|
||||
with:
|
||||
|
|
7
.github/workflows/preview-docs.yml
vendored
7
.github/workflows/preview-docs.yml
vendored
|
@ -11,6 +11,10 @@ jobs:
|
|||
runs-on: ubuntu-20.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- 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
|
||||
|
|
2
.github/workflows/test.yml
vendored
2
.github/workflows/test.yml
vendored
|
@ -9,7 +9,7 @@ on:
|
|||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
runs-on: ubuntu-20.04
|
||||
strategy:
|
||||
matrix:
|
||||
python-version: ["3.6", "3.7", "3.8", "3.9", "3.10", "3.11"]
|
||||
|
|
|
@ -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 ./
|
||||
|
|
Loading…
Reference in a new issue