Thanks for Github and Vercel(Zeit) hard work and great collaboration. We can hook Vercel's preview deployment via deployment_status event
- screenshot desktop for every Vercel Preview Deployment
# .github/workflows/example_screenshots-ci-action.yml
name: screenshots-ci-action Example
on: deployment_status
jobs:
build:
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: install puppeteer-headful
uses: mujo-code/puppeteer-headful@master
env:
CI: 'true'
- name: screenshots-ci-action
uses: flameddd/screenshots-ci-action@master
with:
url: ${{ github.event.deployment_status.target_url }}
- uses: actions/upload-artifact@v2
with:
path: screenshots
name: Download-screenshots