Skip to content

fix: width & height inputs #35

fix: width & height inputs

fix: width & height inputs #35

Workflow file for this run

name: main
on:
push:
branches:
- main
pull_request:
jobs:
main:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build
run: |
mkdir output
mv index.html copy.png favicon.png og.png favicon.ico likely.css likely.js output
- name: Make screenshot
uses: chuhlomin/webpage-screenshot-action@main
with:
url: file://${{github.workspace}}/output/index.html
mode: page
output: screenshot.png
width: 1024
height: 768
- name: Upload screenshot
uses: actions/upload-artifact@v3
if: github.event_name == 'pull_request'
with:
name: screenshot
path: screenshot.png
- name: Commit screenshot (if changed)
if: github.event_name == 'push'
run: |
if (git status --porcelain | grep screenshot.png)
then
git config user.name github-actions
git config user.email github-actions@github.com
git add screenshot.png
git commit -m "Update screenshot [skip ci]"
git push
fi
- name: Publish
uses: cloudflare/wrangler-action@2.0.0
if: github.event_name == 'push'
with:
apiToken: ${{ secrets.CF_API_TOKEN }}
accountId: ${{ secrets.CF_ACCOUNT_ID }}
command: pages deploy output --project-name=timestamp --branch=main --commit-dirty=true