debug(gha): change width value to string #32
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: main | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
main: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Build | |
run: | | |
mkdir output | |
mv index.html copy.png favicon.png og.png favicon.ico likely.css likely.js output | |
- name: Publish | |
uses: cloudflare/wrangler-action@2.0.0 | |
with: | |
apiToken: ${{ secrets.CF_API_TOKEN }} | |
accountId: ${{ secrets.CF_ACCOUNT_ID }} | |
command: pages deploy output --project-name=timestamp --branch=main --commit-dirty=true | |
- name: Make screenshot | |
uses: karol-brejna-i/webpage-screenshot-action@v1 # JS, Puppeteer | |
with: | |
# url: https://ts.chuhlomin.com | |
url: file://${{github.workspace}}/output/index.html | |
mode: page | |
output: screenshot.png | |
width: "1024" | |
- name: Upload screenshot | |
uses: actions/upload-artifact@v2 | |
with: | |
name: screenshot | |
path: screenshot.png | |
- name: Commit screenshot (if changed) | |
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 |