Never spend time again to create awesome screenshots of your websites.
This Github action creates a new screenshot job via Websiteshot. Prerequisite for the use is an account at Websiteshot.
Name of Action: websiteshot/github-action
Mandatory Environment Variables:
PROJECT_ID: The associated Websiteshot project in which the screenshots are created.API_KEY: Your Websiteshot API Key
One of those Environment Variables must be set:
URLS: URLs für Screenshot creation inJSONFormat (Array of url-config)TEMPLATE_ID: Template Id of Template that should be used
Optional Parameters:
SCHEDULE_TS: Timestamp when to trigger the Screenshot JobSCHEDULE_UNITandSCHEDULE_VALUE: Instead of a timestamp you can specify a relative description from now on, like15mthat will be translated into a timestamp in 15 minutes.
This Github action uses Websiteshot's NodeJS client to trigger screenshot jobs.
An example configuration looks like this:
name: Publish
on: [push]
jobs:
create-screenshot:
runs-on: ubuntu-latest
name: 'Schedule Screenshot Creation'
steps:
- uses: websiteshot/github-action@main
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
API_KEY: ${{ secrets.API_KEY }}
URLS: '[{"url": "https://websiteshot.app", "name": "Websiteshot"}]'
SCHEDULE_UNIT: 'm'
SCHEDULE_VALUE: '5'Or if you want to execute a Job via Template:
name: Publish
on: [push]
jobs:
create-screenshot:
runs-on: ubuntu-latest
name: 'Schedule Screenshot Creation via Template'
steps:
- uses: websiteshot/github-action@main
env:
PROJECT_ID: ${{ secrets.PROJECT_ID }}
API_KEY: ${{ secrets.API_KEY }}
TEMPLATE_ID: 'abcdef-ghi...'