-
Notifications
You must be signed in to change notification settings - Fork 361
51 lines (43 loc) · 1.52 KB
/
preview-theme.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
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 }}
has_artifacts: ${{ steps.prepare_zips.outputs.zip_paths != '' && 'true' || 'false' }}
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
if: needs.prepare-and-upload-zips.outputs.has_artifacts == 'true'
runs-on: ubuntu-latest
steps:
- name: Download Artifacts
uses: actions/download-artifact@v2
with:
name: theme-zips
- name: Checkout Code
uses: actions/checkout@v2
- 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 }}