Skip to content

Commit faeda2b

Browse files
authored
Update GitHub Actions workflow for beta deployment
1 parent 8bc2688 commit faeda2b

File tree

1 file changed

+6
-10
lines changed

1 file changed

+6
-10
lines changed

.github/workflows/send-beta-build.yml

Lines changed: 6 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,6 @@ on:
44
push:
55
branches:
66
- v2.0.0
7-
workflow_dispatch:
8-
inputs:
9-
subfolder:
10-
description: 'Target subfolder in beta repo'
11-
required: true
12-
default: 'HTMLNotes'
137

148
concurrency:
159
group: "deploy-beta"
@@ -28,12 +22,12 @@ jobs:
2822
- name: Checkout source repo
2923
uses: actions/checkout@v4
3024
with:
31-
ref: v2.0.0
25+
ref: v2.2.0
3226

3327
- name: Determine subfolder and zip name
3428
id: set-zip-name
3529
run: |
36-
SUBFOLDER="${{ github.event.inputs.subfolder || 'HTMLNotes' }}"
30+
SUBFOLDER="${{ github.event.repository.name }}"
3731
ZIP_NAME="$(echo "${SUBFOLDER}" | tr '[:upper:]' '[:lower:]')-build.zip"
3832
3933
echo "Subfolder: ${SUBFOLDER}"
@@ -96,19 +90,21 @@ jobs:
9690
run: |
9791
set -euo pipefail
9892
93+
BETA_REPO="${{ github.repository_owner }}/beta"
9994
SUBFOLDER="${{ steps.set-zip-name.outputs.subfolder }}"
10095
ARTIFACT_URL="${{ steps.get-artifact.outputs.url }}"
10196
ZIP_NAME="${{ steps.set-zip-name.outputs.zip_name }}"
10297
103-
echo "Dispatching with:"
98+
echo "Dispatching to: ${BETA_REPO}"
99+
echo "With:"
104100
echo " subfolder: ${SUBFOLDER}"
105101
echo " artifact_url: ${ARTIFACT_URL}"
106102
echo " zip_name: ${ZIP_NAME}"
107103
108104
curl -X POST \
109105
-H "Authorization: token ${{ secrets.BETA_PAT_TOKEN }}" \
110106
-H "Accept: application/vnd.github+json" \
111-
https://api.github.com/repos/HTMLToolkit/beta/dispatches \
107+
https://api.github.com/repos/${BETA_REPO}/dispatches \
112108
-d '{
113109
"event_type": "deploy-build",
114110
"client_payload": {

0 commit comments

Comments
 (0)