diff --git a/.github/workflows/lighthouse.yml b/.github/workflows/lighthouse.yml index 5fa900a8e..8f41fac8f 100644 --- a/.github/workflows/lighthouse.yml +++ b/.github/workflows/lighthouse.yml @@ -22,30 +22,22 @@ jobs: - name: Install Dependencies run: yarn install --frozen-lockfile - - name: Install ZCLI - run: npm install -g @zendesk/zcli - - - name: Verify ZCLI Installation - run: zcli --version - - - name: ZCLI login - run: zcli login -i - env: - ZENDESK_EMAIL: ${{ secrets.ZENDESK_EMAIL }} - ZENDESK_API_TOKEN: ${{ secrets.ZENDESK_API_TOKEN }} - ZENDESK_SUBDOMAIN: ${{ secrets.ZENDESK_SUBDOMAIN }} + - name: Install ZCLI and Expect + run: | + npm install -g @zendesk/zcli + sudo apt-get update && sudo apt-get install -y expect - # Step 4: Configure zcli with environment variables - - name: Configure ZCLI + # Step 4: Automate ZCLI Login + - name: ZCLI Login run: | - mkdir -p ~/.zcli - echo "default:\n email: ${ZENDESK_EMAIL}\n token: ${ZENDESK_API_TOKEN}\n subdomain: ${ZENDESK_SUBDOMAIN}" > ~/.zcli/config.yml + chmod +x ./bin/zcli-login.expect + ./bin/zcli-login.expect $ZENDESK_SUBDOMAIN $ZENDESK_EMAIL $ZENDESK_API_TOKEN env: + ZENDESK_SUBDOMAIN: ${{ secrets.ZENDESK_SUBDOMAIN }} ZENDESK_EMAIL: ${{ secrets.ZENDESK_EMAIL }} ZENDESK_API_TOKEN: ${{ secrets.ZENDESK_API_TOKEN }} - ZENDESK_SUBDOMAIN: ${{ secrets.ZENDESK_SUBDOMAIN }} - - name: Test ZCLI Configuration 2 + - name: Test ZCLI Configuration run: zcli themes:list # Step 5: Upload and Publish Theme