feat: add intercom chat #116
This file contains hidden or 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
| name: Run on PRs | |
| on: | |
| pull_request: | |
| types: [opened, closed, synchronize] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: '22' | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v4 | |
| with: | |
| version: 10.6.3 | |
| run_install: false | |
| - name: Install dependencies | |
| run: pnpm i | |
| - name: Run build for non-merged PR | |
| if: github.event.action != 'closed' && github.event.pull_request.merged != true | |
| id: build_non_merge | |
| env: | |
| ZE_SECRET_TOKEN: ${{ secrets.ZEPHYR_AUTH_TOKEN }} | |
| run: | | |
| OUTPUT=$(pnpm run build) | |
| echo "$OUTPUT" | |
| URL=$(echo "$OUTPUT" | grep -oE 'https://[^ ]+') | |
| VERSION=$(echo "$OUTPUT" | grep -oP 'ZEPHYR\s+\K\S+(?=#)') | |
| echo "Extracted Zephyr URL: $URL" | |
| echo "Extracted VERSION: $VERSION" | |
| echo "version=$VERSION" >> "$GITHUB_OUTPUT" | |
| echo "url=$URL" >> "$GITHUB_OUTPUT" | |
| - name: Run build for merged PR on main or development | |
| if: github.event.pull_request.merged == true && | |
| github.event.action == 'closed' && | |
| (github.event.pull_request.base.ref == 'main' || github.event.pull_request.base.ref == 'development') | |
| id: build_merge | |
| env: | |
| ZE_SECRET_TOKEN: ${{ secrets.ZEPHYR_AUTH_TOKEN }} | |
| run: pnpm run build | |
| - name: Zephyr deploy summary | |
| uses: ZephyrCloudIO/deploy-summary-action@v1.3.0 | |
| id: zephyr-summary | |
| with: | |
| application_uid: zephyr-landing.zephyr-website.zephyrcloudio | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| github_environment: Zephyr Landing Page (Preview) |