Skip to content

Commit

Permalink
Merge pull request #7 from robinmordasiewicz/mkdocs-config-10
Browse files Browse the repository at this point in the history
refactor(puppeteer.js): change screenshot save path to 'docs/img/github-profile.png' The screenshot taken by Puppeteer is now saved in the 'docs/img' directory instead of the root directory. This change was made to keep the project root directory clean and organize all images in a dedicated directory.
  • Loading branch information
robinmordasiewicz authored Nov 19, 2023
2 parents b669b40 + e1089d1 commit 5f74d76
Show file tree
Hide file tree
Showing 3 changed files with 8 additions and 8 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/screenshots.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,17 +29,17 @@ jobs:
- uses: browser-actions/setup-chrome@11cef13cde73820422f9263a707fb8029808e191
- uses: actions/setup-node@8f152de45cc393bb48ce5d89d36b731f54556e65

- name: Run test
uses: tj-actions/puppeteer@a2befb374cdb596ae129a21e0a52494eb028ee82
id: puppeteer
with:
files: |
puppeteer.js
# - name: Run test
# uses: tj-actions/puppeteer@a2befb374cdb596ae129a21e0a52494eb028ee82
# id: puppeteer
# with:
# files: |
# puppeteer.js

- name: Install dependencies
run: npm i puppeteer

- name: Run headless test
- name: Screenshots
uses: coactions/setup-xvfb@b6b4fcfb9f5a895edadc3bc76318fae0ac17c8b3
with:
run: node puppeteer.js
Expand Down
Binary file modified docs/img/github-profile.png
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
2 changes: 1 addition & 1 deletion puppeteer.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ const puppeteer = require('puppeteer');
await page.setViewport({ width: 1500, height: 1080 })
await page.goto('https://github.com/robinmordasiewicz')
await page.screenshot({
path: 'github-profile.png'
path: './docs/img/github-profile.png'
})

await browser.close()
Expand Down

0 comments on commit 5f74d76

Please sign in to comment.