diff --git a/.github/workflows/checkly.yml b/.github/workflows/checkly.yml index 1fa4eb2..44ba927 100644 --- a/.github/workflows/checkly.yml +++ b/.github/workflows/checkly.yml @@ -1,4 +1,4 @@ -name: 'Checkly Checks' +name: 'Checkly' on: [deployment_status] env: ENVIRONMENT_URL: ${{ github.event.deployment_status.environment_url }} @@ -7,11 +7,11 @@ env: CHECKLY_TEST_ENVIRONMENT: ${{ github.event.deployment_status.environment }} jobs: test-e2e: - if: github.event.deployment_status.state == 'success' && contains(github.event.deployment_status.environment_url, 'checklyhq-') + if: github.event_name == 'deployment_status' && github.event.deployment_status.state == 'success' name: Test E2E on Checkly runs-on: ubuntu-latest environment: - name: staging + name: Preview timeout-minutes: 10 permissions: write-all steps: diff --git a/README.md b/README.md index f53310c..de40a58 100644 --- a/README.md +++ b/README.md @@ -1,37 +1,27 @@ ## Getting Started -First, run the development server: -```bash -npm run dev -# or -yarn dev -# or -pnpm dev -# or -bun dev -``` -Open [http://localhost:3000](http://localhost:3000) with your browser to see the result. -You can start editing the page by modifying `app/page.tsx`. The page auto-updates as you edit the file. +## Running Checks before & after Deployment in CI -This project uses [`next/font`](https://nextjs.org/docs/app/building-your-application/optimizing/fonts) to automatically optimize and load [Geist](https://vercel.com/font), a new font family for Vercel. +You can run your Checkly checks right after any **Vercel Preview Deployment** and then deploy your checks as +monitors on Checkly. This is a powerful strategy to make sure your never ship critical breaking errors +to **Production**, while at the same time surfacing any outages in your **Production Deployments**. -## Learn More +This example uses GitHub Actions. Check out the workflow in `.github/workflows/checkly.yml` but you can any other CI platform. +We have [example configs for Jenkins and GitLab CI in our docs](https://www.checklyhq.com/docs/cicd/). -To learn more about Next.js, take a look at the following resources: -- [Next.js Documentation](https://nextjs.org/docs) - learn about Next.js features and API. -- [Learn Next.js](https://nextjs.org/learn) - an interactive Next.js tutorial. +1. Create an API key [in the API keys section of your Checkly account](https://app.checklyhq.com/settings/user/api-keys) +2. Take a note of your [Checkly Account ID in the General section of your Checkly account](https://app.checklyhq.com/settings/account/general) +3. Save your API key and Account ID as `CHECKLY_API_KEY` and `CHECKLY_ACCOUNT_ID` as **secrets** in your GitHub Actions configuration. -You can check out [the Next.js GitHub repository](https://github.com/vercel/next.js) - your feedback and contributions are welcome! +![GitHub Actions Secret Page](assets/gh_actions_secrets.png) -## Deploy on Vercel - -The easiest way to deploy your Next.js app is to use the [Vercel Platform](https://vercel.com/new?utm_medium=default-template&filter=next.js&utm_source=create-next-app&utm_campaign=create-next-app-readme) from the creators of Next.js. - -Check out our [Next.js deployment documentation](https://nextjs.org/docs/app/building-your-application/deploying) for more details. +Links: +- [Checkly docs on GitHub Actions integration](https://www.checklyhq.com/docs/cicd/github-actions/) +- [Vercel docs on running tests](https://vercel.com/guides/how-can-i-run-end-to-end-tests-after-my-vercel-preview-deployment) ## Notes diff --git a/assets/gh_actions_secrets.png b/assets/gh_actions_secrets.png new file mode 100644 index 0000000..fe09fc2 Binary files /dev/null and b/assets/gh_actions_secrets.png differ