Skip to content

Create zcli-login.expect #108

Create zcli-login.expect

Create zcli-login.expect #108

Workflow file for this run

name: Deploy to Production
on:
push:
branches:
- master
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# Step 1: Check out the repository
- name: Checkout
uses: actions/checkout@v3
# Step 2: Set up Node.js environment
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: '20.17.0'
# Step 3: Install dependencies
- 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 }}
# Step 4: Configure zcli with environment variables
- name: Configure ZCLI
run: |
mkdir -p ~/.zcli
echo "default:\n email: ${ZENDESK_EMAIL}\n token: ${ZENDESK_API_TOKEN}\n subdomain: ${ZENDESK_SUBDOMAIN}" > ~/.zcli/config.yml
env:
ZENDESK_EMAIL: ${{ secrets.ZENDESK_EMAIL }}
ZENDESK_API_TOKEN: ${{ secrets.ZENDESK_API_TOKEN }}
ZENDESK_SUBDOMAIN: ${{ secrets.ZENDESK_SUBDOMAIN }}
- name: Test ZCLI Configuration 2
run: zcli themes:list
# Step 5: Upload and Publish Theme
- name: Deploy Theme
run: node ./bin/theme-upload.js