Ecosyste.ms: Awesome

An open API service indexing awesome lists of open source software.

Awesome Lists | Featured Topics | Projects

https://github.com/dtinth/puppeteer-event-popper

GitHub Action to use Puppeteer to publish event description to Eventpop
https://github.com/dtinth/puppeteer-event-popper

github-actions nodejs puppeteer

Last synced: about 1 month ago
JSON representation

GitHub Action to use Puppeteer to publish event description to Eventpop

Awesome Lists containing this project

README

        

# puppeteer-event-popper
GitHub Action to use Puppeteer to publish event description to Eventpop through [event-popper](https://github.com/dtinth/event-popper).

## Examples

`puppeteer-event-popper` is used to deploy the event description for the following events:

- [Hacktoberfest BKK 2019](https://www.eventpop.me/e/7013) ([source](https://github.com/dtinth/hacktoberfest-open-hack-day-bkk-2019))

## How to use

1. Deploy an instance of [event-popper](https://github.com/dtinth/event-popper) to Netlify.

This gives you a REST API that you can use to deploy event descriptions to Eventpop,
so that you don’t need to put in your Eventpop credentials in your CD pipeline.

2. Create an HTML file. That file should declare a global JavaScript function called `getEventpopDescription()`
which should return the HTML content to be deployed.
It may optionally return a Promise, in which this script will await for the result.

See [example/index.html](example/index.html) for a bare-bones example.

3. Go to your GitHub Repository settings → Secrets.
Add the following secrets:

- `EVENT_POPPER_API_KEY`
- `EVENT_POPPER_URL`

4. Add the following workflow:

```yaml
name: Deploy event description to Eventpop
on:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- uses: docker://dtinth/puppeteer-event-popper:latest
with:
args: description.html
env:
EVENT_POPPER_API_KEY: ${{ secrets.EVENT_POPPER_API_KEY }}
EVENT_POPPER_URL: ${{ secrets.EVENT_POPPER_URL }}
```