add debug step and dont upload if no zips present #4
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Preview Theme Changes | |
on: | |
push: | |
branches: | |
- add/playground-theme-preview | |
jobs: | |
prepare-and-upload-zips: | |
runs-on: ubuntu-latest | |
outputs: | |
zip_paths: ${{ steps.prepare_zips.outputs.zip_paths }} | |
steps: | |
- name: Checkout Code | |
uses: actions/checkout@v2 | |
- name: Prepare Zips and Determine Paths | |
id: prepare_zips | |
run: bash bin/prepare-zips.sh | |
# Debugging: Print the ZIP paths generated | |
- name: Print ZIP Paths | |
run: | | |
echo "ZIP Paths: ${{ steps.prepare_zips.outputs.zip_paths }}" | |
- name: Upload Zips as Artifacts | |
if: steps.prepare_zips.outputs.zip_paths != '' | |
uses: actions/upload-artifact@v2 | |
with: | |
name: theme-zips | |
path: ${{ steps.prepare_zips.outputs.zip_paths }} | |
generate-and-post-preview-links: | |
needs: prepare-and-upload-zips | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v2 | |
with: | |
name: theme-zips | |
- name: Generate Preview Links | |
id: generate_links | |
run: bash bin/generate-preview-links.sh "${{ github.event.pull_request.number }}" "${{ needs.prepare-and-upload-zips.outputs.zip_paths }}" | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |