Hi there,
I am currently trying to implement a CD flow on my GitHub Actions that involves building and deploying to a staging website, running end-to-end tests on it, and then deploying to the production environment using Netlify’s CD mechanism. (2 different sites).
I have attempted to use build hooks, but I’m encountering an issue with the “Wait for Netlify Build and Deploy” action in my GitHub workflow. Specifically, it doesn’t seem to be using the same sha as the build hook, which is critical for me to validate that the website has been deployed before running the tests.
I would appreciate any suggestions on how to improve this flow and what is the best practice to run e2e tests before deploying my site to production.
Here is the current “Wait for Netlify Build and Deploy” action in my workflow:
- name: Wait for Netlify Build and Deploy
uses: probablyup/wait-for-netlify-action@3.2.0
id: waitForDeployment
with:
site_id: ${{ secrets.NETLIFY_STAGING_SITE_ID }}
env:
NETLIFY_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}