Fix how data is passed #11
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
name: Deploy to Checkly on merges to main | |
on: | |
push: | |
branches: | |
- main | |
workflow_dispatch: | |
secrets: | |
BITBUCKET_READ_ONLY_SSH_KEY: | |
required: false | |
GITHUB_READ_ONLY_SSH_KEY: | |
required: false | |
CHECKLY_API_KEY: | |
required: false | |
CHECKLY_ACCOUNT_ID: | |
required: false | |
permissions: | |
contents: read | |
# See https://www.checklyhq.com/docs/cli/command-line-reference/#npx-checkly-deploy and supporting documentation for | |
# more details on Checkly environment variables. | |
env: | |
CHECKLY_ACCOUNT_ID: ${{ secrets.CHECKLY_ACCOUNT_ID }} | |
CHECKLY_API_KEY: ${{ secrets.CHECKLY_API_KEY }} | |
CHECKLY_REPO_BRANCH: ${{ github.head_ref }} | |
CHECKLY_REPO_COMMIT_OWNER: ${{ github.actor }} | |
CHECKLY_REPO_SHA: ${{ github.sha }} | |
CHECKLY_TEST_ENVIRONMENT: ${{ inputs.QA_SITE_DOMAIN }} | |
FEATURE_BRANCH_NAME: $(echo "${{ github.head_ref || github.ref_name }}" | sed -e 's/feature\/\(.*\)/\1/' | tr '[:upper:]' '[:lower:]') | |
NPM_QAT_SCRIPT: "qat" | |
jobs: | |
checkly-deploy: | |
name: Checkly Run and Deploy | |
runs-on: ubuntu-latest | |
timeout-minutes: 90 | |
# if the check_files step in the check-qat job doesn't fail | |
concurrency: | |
group: ${{ github.ref_name || github.run_id }}-checkly-qat | |
cancel-in-progress: true | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 # Check out the full git history | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 20 # Checkly CLI requires Node.js 16 or higher. | |
- name: Restore or cache node_modules # Restore node_modules cache if available | |
id: cache-node-modules | |
uses: actions/cache@v4 | |
with: | |
path: node_modules | |
key: node-modules-${{ hashFiles('package-lock.json') }} | |
- name: Install dependencies # Install NPM dependencies if cache miss | |
if: steps.cache-node-modules.outputs.cache-hit != 'true' | |
run: npm ci | |
- name: Deploy checks # Deploy checks to Checkly for debugging | |
# Only run if the pull request is merging into the main branch | |
if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} | |
id: deploy-checks | |
run: npm run qat:checkly:deploy -- --force |