forked from zendesk/copenhagen_theme
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
30 additions
and
39 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,49 +1,40 @@ | ||
name: Lighthouse | ||
"on": [push] | ||
name: Deploy to Production | ||
on: | ||
push: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lighthouse: | ||
deploy: | ||
runs-on: ubuntu-latest | ||
steps: | ||
# Step 1: Check out the repository | ||
- name: Checkout | ||
uses: zendesk/checkout@v3 | ||
uses: actions/checkout@v3 | ||
|
||
# Step 2: Set up Node.js environment | ||
- name: Setup Node.js | ||
uses: zendesk/setup-node@v3 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version-file: ".nvmrc" | ||
- name: Install node_modules | ||
node-version: '20.17.0' | ||
|
||
# Step 3: Install dependencies | ||
- name: Install Dependencies | ||
run: yarn install --frozen-lockfile | ||
|
||
# Step 4: Configure zcli with environment variables | ||
- name: Configure ZCLI | ||
run: | | ||
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 }} | ||
|
||
# Step 5: Build the project | ||
- name: Build | ||
run: yarn build | ||
# deactivate this step since it will make the current theme live on production | ||
# TODO: activate this with configuration once the theme is ready for production | ||
# - name: Upload theme | ||
# run: node ./bin/theme-upload.js | ||
# env: | ||
# ZENDESK_EMAIL: ${{ secrets.zendesk_email }} | ||
# ZENDESK_API_TOKEN: ${{ secrets.zendesk_token }} | ||
# ZENDESK_SUBDOMAIN: ${{ secrets.subdomain }} | ||
# BRAND_ID: ${{ secrets.brand_id }} | ||
# - name: Audit URLs using Lighthouse | ||
# run: yarn test-a11y | ||
# env: | ||
# end_user_email: ${{ secrets.end_user_email }} | ||
# end_user_password: ${{ secrets.end_user_password }} | ||
# subdomain: ${{ secrets.subdomain }} | ||
# urls: | | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/categories/360002267479 | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/sections/360003307259 | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/articles/360010829359 | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/requests/new | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/search?utf8=%E2%9C%93&query=Help+Center | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/community/topics | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/community/topics/360000644279 | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/community/posts | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/community/posts/360006766799 | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/profiles/364655812519 | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/contributions/posts?locale=en-us | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/subscriptions | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/requests | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/requests/3 | ||
# https://${{ secrets.subdomain }}.zendesk.com/hc/en-us/community/posts/new | ||
|
||
# Step 6: Upload and Publish Theme | ||
- name: Deploy Theme | ||
run: node ./bin/theme-upload.js |