|
18 | 18 |
|
19 | 19 | steps:
|
20 | 20 | - name: Check out Git repository
|
21 |
| - uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7 |
22 |
| - with: |
23 |
| - ref: ${{ github.event.pull_request.head.sha || github.sha }} |
| 21 | + uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4.1.6 |
24 | 22 |
|
25 | 23 | - name: Setup node environment
|
26 | 24 | uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
|
|
46 | 44 | uses: actions/upload-artifact@834a144ee995460fba8ed112a2fc961b36a5ec5a # v4.3.6
|
47 | 45 | with:
|
48 | 46 | name: jellyfin-web__prod
|
49 |
| - path: dist |
50 |
| - |
51 |
| - publish: |
52 |
| - name: Deploy to Cloudflare Pages |
53 |
| - runs-on: ubuntu-latest |
54 |
| - if: ${{ github.repository == 'jellyfin/jellyfin-web' }} |
55 |
| - needs: |
56 |
| - - run-build-prod |
57 |
| - permissions: |
58 |
| - contents: read |
59 |
| - deployments: write |
60 |
| - |
61 |
| - steps: |
62 |
| - - name: Add comment |
63 |
| - uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 |
64 |
| - if: ${{ github.event_name == 'pull_request_target' }} |
65 |
| - with: |
66 |
| - GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }} |
67 |
| - message: | |
68 |
| - ## Cloudflare Pages deployment |
69 |
| -
|
70 |
| - | **Latest commit** | <code>${{ github.event.pull_request.head.sha || github.sha }}</code> | |
71 |
| - |-------------------|:-:| |
72 |
| - | **Status** | 🔄 Deploying... | |
73 |
| - | **Preview URL** | Not available | |
74 |
| - | **Type** | 🔀 Preview | |
75 |
| - pr_number: ${{ github.event.pull_request.number }} |
76 |
| - comment_tag: CFPages-deployment |
77 |
| - mode: recreate |
78 |
| - |
79 |
| - - name: Download workflow artifact |
80 |
| - uses: dawidd6/action-download-artifact@09f2f74827fd3a8607589e5ad7f9398816f540fe # v3.1.4 |
81 |
| - with: |
82 |
| - name: jellyfin-web__prod |
83 |
| - path: dist |
84 |
| - |
85 |
| - - name: Publish to Cloudflare |
86 |
| - id: cf |
87 |
| - uses: cloudflare/wrangler-action@f84a562284fc78278ff9052435d9526f9c718361 # v3.7.0 |
88 |
| - with: |
89 |
| - apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
90 |
| - accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }} |
91 |
| - command: pages deploy dist --project-name=jellyfin-web --branch=${{ |
92 |
| - (github.event_name != 'pull_request_target' || github.event.pull_request.head.repo.full_name == github.repository) |
93 |
| - && (github.event.pull_request.head.ref || github.ref_name) |
94 |
| - || format('{0}/{1}', github.event.pull_request.head.repo.full_name, github.event.pull_request.head.ref) |
95 |
| - }} --commit-hash=${{ github.event.pull_request.head.sha || github.sha }} |
96 |
| - |
97 |
| - - name: Update status comment (Success) |
98 |
| - if: ${{ github.event_name == 'pull_request_target' && success() }} |
99 |
| - uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 |
100 |
| - with: |
101 |
| - GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }} |
102 |
| - message: | |
103 |
| - ## Cloudflare Pages deployment |
104 |
| -
|
105 |
| - | **Latest commit** | <code>${{ github.event.pull_request.head.sha || github.sha }}</code> | |
106 |
| - |-------------------|:-:| |
107 |
| - | **Status** | ✅ Deployed! | |
108 |
| - | **Preview URL** | ${{ steps.cf.outputs.deployment-url != '' && steps.cf.outputs.deployment-url || 'Not available' }} | |
109 |
| - | **Type** | 🔀 Preview | |
110 |
| - pr_number: ${{ github.event.pull_request.number }} |
111 |
| - comment_tag: CFPages-deployment |
112 |
| - mode: recreate |
113 |
| - |
114 |
| - - name: Update status comment (Failure) |
115 |
| - if: ${{ github.event_name == 'pull_request_target' && failure() }} |
116 |
| - uses: thollander/actions-comment-pull-request@fabd468d3a1a0b97feee5f6b9e499eab0dd903f6 # v2.5.0 |
117 |
| - with: |
118 |
| - GITHUB_TOKEN: ${{ secrets.JF_BOT_TOKEN }} |
119 |
| - message: | |
120 |
| - ## Cloudflare Pages deployment |
121 |
| -
|
122 |
| - | **Latest commit** | <code>${{ github.event.pull_request.head.sha || github.sha }}</code> | |
123 |
| - |-------------------|:-:| |
124 |
| - | **Status** | ❌ Failure. Check workflow logs for details | |
125 |
| - | **Preview URL** | Not available | |
126 |
| - | **Type** | 🔀 Preview | |
127 |
| - pr_number: ${{ github.event.pull_request.number }} |
128 |
| - comment_tag: CFPages-deployment |
129 |
| - mode: recreate |
| 47 | + path: | |
| 48 | + dist |
0 commit comments