Using GitHub Actions without cypress-io/github-action

If youโ€™re using GitHub Actions and running tests by calling a script, but arenโ€™t using Cypressโ€™s @cypress-io/github-action, create a similar script in package.json like this:
"scripts": { "cy:run": "cypress run", // original test script "cy:run:replay": "cypress run --browser=replay-chromium" // new test script }
Use that new test script instead in your current workflow file, and add the environment variable(s):
- name: Cypress run # run: npm run cy:run run: npm run cy:run:replay env: REPLAY_API_KEY: ${{ secrets.RECORD_REPLAY_API_KEY }}
Add a new step to run after this Cypress GitHub Action for uploading the replays:
- name: Upload replays if: always() uses: replayio/action-upload@v0.5.1 with: api-key: ${{ secrets.RECORD_REPLAY_API_KEY }}
Lastly, add your API key to your Secrets. To get an API key, create a new Replay team and generate an API key โ€” instructions can be found here.
โš ๏ธ
If you run into any problems, consult our troubleshooting guide here.