awesome-github-profiles icon indicating copy to clipboard operation
awesome-github-profiles copied to clipboard

Automate screenshots

Open alrifay opened this issue 5 years ago • 9 comments

Create a Github action to take screenshots of the new profile.

When a new user want to add a new profile, they create an issue with the title add|eddiejaoude Then a github action starts on new issues that it's name beginning with add| and take a screenshot of the username profile and add it in a comment. If the profile is ok, you (repository maintainer) create a new comment (for example: @add-profile) and a github action starts and add the profile to README.

I don't know if this possible or not 😁.

Example for takeing a screenshot using puppeteer:

const puppeteer = require('puppeteer');

(async () => {
    const browser = await puppeteer.launch();
    const page = await browser.newPage();
    page.setViewport({
        width: 2000,
        height: 2000,
    });
    await page.goto('https://github.com/eddiejaoude', { waitUntil: 'networkidle2' });
    await page.screenshot({
        path: 'example.png',
        clip: {
            x: 380,
            y: 360,
            width: 1230,
            height: 830,
        },
    });
    await browser.close();
})();

Resources:

alrifay avatar Aug 06 '20 01:08 alrifay

Interesting idea 👍

eddiejaoude avatar Aug 06 '20 11:08 eddiejaoude

Alternative for screenshots https://www.npmjs.com/package/url-to-screenshot

eddiejaoude avatar Aug 07 '20 16:08 eddiejaoude

Cypress is another tool we could use https://docs.cypress.io/api/commands/screenshot

eddiejaoude avatar Jul 26 '21 22:07 eddiejaoude

Stale issue message

github-actions[bot] avatar Sep 25 '21 02:09 github-actions[bot]

Stale issue message

github-actions[bot] avatar Dec 03 '21 02:12 github-actions[bot]

btw I tried puppeteer screenshots in #672 but it didn't even work in gitpod, not sure how to make it work in GH actions 🤔

gptkrsh avatar Dec 03 '21 03:12 gptkrsh

Stale issue message

github-actions[bot] avatar Feb 02 '22 02:02 github-actions[bot]

What has to be done about this? Wait till, the nextjs update?

gptkrsh avatar Feb 02 '22 07:02 gptkrsh

I don't think this needs to wait until the NextJS upgrade

eddiejaoude avatar May 22 '22 11:05 eddiejaoude