Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

👷 Refactor CI artifact upload/download for docs previews #59

Merged
merged 1 commit into from
Dec 16, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/build-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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.2.4
with:
Expand Down
7 changes: 6 additions & 1 deletion .github/workflows/preview-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,16 +11,21 @@ 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.9.0
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
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
Expand Down
4 changes: 3 additions & 1 deletion scripts/zip-docs.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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 ./