Skip to content

Commit fbd2594

Browse files
committed
Enhance GitHub Actions workflow for SmartThings CLI authentication
- Added ST_TOKEN environment variable for improved security in SmartThings CLI authentication. - Updated authentication step to verify the presence of ST_TOKEN, ensuring clearer error handling and feedback during deployment.
1 parent 81af3ce commit fbd2594

File tree

1 file changed

+9
-2
lines changed

1 file changed

+9
-2
lines changed

.github/workflows/deploy.yml

Lines changed: 9 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@ on:
1919
jobs:
2020
deploy:
2121
runs-on: ubuntu-latest
22+
env:
23+
ST_TOKEN: ${{ secrets.SMARTTHINGS_PERSONAL_ACCESS_TOKEN }}
2224

2325
steps:
2426
- name: Checkout code
@@ -33,9 +35,14 @@ jobs:
3335
run: |
3436
npm install -g @smartthings/cli@latest
3537
36-
- name: Authenticate SmartThings CLI
38+
- name: Verify SmartThings CLI authentication
3739
run: |
38-
smartthings auth --token "${{ secrets.SMARTTHINGS_PERSONAL_ACCESS_TOKEN }}"
40+
# SmartThings CLI uses ST_TOKEN environment variable for authentication
41+
if [[ -z "$ST_TOKEN" ]]; then
42+
echo "ERROR: ST_TOKEN environment variable is not set"
43+
exit 1
44+
fi
45+
echo "SmartThings CLI authentication configured via ST_TOKEN"
3946
4047
- name: Setup dependencies
4148
run: |

0 commit comments

Comments
 (0)