Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/gregbrimble/tailwindui-crawler-action
Automate the crawling and cataloging of the Tailwind UI components
https://github.com/gregbrimble/tailwindui-crawler-action
Last synced: 28 days ago
JSON representation
Automate the crawling and cataloging of the Tailwind UI components
- Host: GitHub
- URL: https://github.com/gregbrimble/tailwindui-crawler-action
- Owner: GregBrimble
- License: mit
- Created: 2020-04-25T10:11:53.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2021-04-16T21:06:50.000Z (over 3 years ago)
- Last Synced: 2024-10-14T15:04:12.256Z (about 1 month ago)
- Language: JavaScript
- Homepage: https://tailwindui.com
- Size: 213 KB
- Stars: 26
- Watchers: 4
- Forks: 13
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Tailwind UI Crawler Action
> Automate the crawling and cataloging of the Tailwind UI components
[![GitHub Actions Example/Test](https://github.com/GregBrimble/tailwindui-crawler-action/workflows/Example/Test/badge.svg)](https://github.com/GregBrimble/tailwindui-crawler-action/actions?query=workflow%3AExample%2FTest)
## Usage
1. [Create a **private** GitHub repository](https://github.com/new/).
1. [Add `TAILWINDUI_EMAIL` and `TAILWINDUI_PASSWORD` secrets to the GitHub repository](https://help.github.com/en/actions/configuring-and-managing-workflows/creating-and-storing-encrypted-secrets#creating-encrypted-secrets).
1. [Optionally create a `.env` file with additional settings for the crawler](https://github.com/kiliman/tailwindui-crawler#%EF%B8%8F-example-env-file).
1. Create a new file `.github/workflows/default.yml`:```yml
name: Update
on:
workflow_dispatch: # On manual trigger
schedule:
- cron: "0 0 * * *" # Every day at midnightjobs:
update:
name: Update
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Run crawler
uses: gregbrimble/[email protected]
with:
email: ${{ secrets.TAILWINDUI_EMAIL }}
password: ${{ secrets.TAILWINDUI_PASSWORD }}
```Read more about the schedule cron syntax in [the official GitHub Actions documentation](https://help.github.com/en/actions/reference/events-that-trigger-workflows#scheduled-events-schedule).
A live example can be found in [`.github/workflows/default.yml`](https://github.com/GregBrimble/tailwindui-crawler-action/blob/master/.github/workflows/default.yml).
### Email Notifications
To be emailed whenever there is a change to a component, simply setup [GitHub Notifications](https://help.github.com/en/github/administering-a-repository/about-email-notifications-for-pushes-to-your-repository#enabling-email-notifications-for-pushes-to-your-repository) on your repository.
## Advanced
The following input options are available:
| Name | Value | Required? | Notes |
| ---------------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | --------- | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |
| `email` | Your tailwindui.com account email address | Yes | |
| `password` | Your tailwindui.com account password | Yes | |
| `token` | [A GitHub Personal Access Token](https://help.github.com/en/github/authenticating-to-github/creating-a-personal-access-token-for-the-command-line) with the `repo` scope | No | Defaults to the automatically provided [`{{ github.token }}`](https://help.github.com/en/actions/configuring-and-managing-workflows/authenticating-with-the-github_token) |
| `output` | The repository to output to
e.g. `gregbrimble/tailwindui` | No | Defaults to the current repository (`{{ github.repository }}`) |
| `outputfolder` | The folder to output the crawled components in the `output` repository (i.e. [the same function as the `OUTPUT` value in `.env`]()). | No | Defaults to `./` |
| `commitmessage` | The message to commit with in the output repository | No | Defaults to `Update tailwindui.com` |
| `current_branch` | The branch in the current repository where .env can be found | No | Defaults to `master` |
| `branch` | The branch to commit changes to | No | Defaults to `master` |
| `force` | `true` \| `false` | No | Defaults to `false` |
| `actor` | The GitHub user to commit changes with
e.g. `gregbrimble` | No | Defaults to the current user (`{{ github.actor }}`) |
| `repository` | The workspace repository
e.g. `gregbrimble/tailwindui` | No | Defaults to the current repository (`{{ github.repository }}`). Should contain a `.env` file in the root. |
| `crawler` | The repository of the crawler to use | No | Defaults to `kiliman/tailwindui-crawler` |
| `crawlerref` | The ref (branch, tag or SHA) to checkout of the crawler repository | No | Defaults to `master` |Note: If using a separate private repository for the output, you must include a Personal Access Token in the `token` input, as the `{{ github.token }}` tokens are scoped to only the current repository.