kiliman/tailwindui-crawler

GitHub Action

GregBrimble opened this issue ยท 8 comments

Hello! Thank you for creating this excellent tool. It has already saved me many hours!

I have created a GitHub Action to automatically run this project, and push the output to a GitHub repo. This allows users to maintain a git version controlled copy of all the components, and for it to keep itself up-to-date.

It also supports the .env file for this project, so you can run all your transformers, and login info is kept securely in secrets.

I'd appreciate any feedback/input/questions you might have, and would love to put this somewhere on your README.md, if you think it could help others.

Awesome. I'm glad you are finding it useful. If you want to add it to the README, send me a PR and I'll merge it.

I'm lazy so I'm always looking for ways to automate repetitive tasks.

I've been working on a workflow for keeping track of my custom React components. Basically I add a comment to my component with the commit hash of the original file. Then when I get the latest updates, I have a script that will tell me which files were changed and what component I need to check. After I make any changes, I update the hash, ready for the next update.

Adam makes a bunch of CSS tweaks so I want to keep my components in sync as much as possible.

I'll get that PR in shortly.

I'm in the same boat. But with this action automatically updating a repo for you, you can just setup GitHub Notifications to be emailed on every change ๐ŸŽ‰

I also have planned a feature to create a PR, rather than just push changes straight to master. I'm envisioning using that as a sort of issue tracker, where users merge the PR once they have made the changes to their components in the various apps they're using TWUI.

@GregBrimble this workflow looks amazing, but I'm having trouble setting this up and testing that it works.

name: Example/Test
on:
  push:
  schedule:
    - cron: "0 0 * * *" # Every day at midnight

jobs:
  test:
    name: Example/Test
    runs-on: ubuntu-latest
    steps:
      - name: Checkout
        uses: actions/checkout@v2
      - name: Run crawler
        uses: gregbrimble/tailwindui-crawler-action@master
        with:
          email: ${{ secrets.TAILWINDUI_EMAIL}}
          password: ${{ secrets.TAILWINDUI_PASSWORD }}
  • I then set up github notifications for my private repository.

At no time did I clone https://github.com/GregBrimble/tailwindui-crawler-action or https://github.com/kiliman/tailwindui-crawler/
Am I missing a step? Thank you!

Hi @connecteev , I've answered you over on the action repo: GregBrimble/tailwindui-crawler-action#5.

thanks @GregBrimble, I got it to work!

Amazing @connecteev ! What was the trick? Discussed on original issue: GregBrimble/tailwindui-crawler-action#5.

@GregBrimble no trick - your instructions in the readme were correct! It was a mistake on my part...thank you!

@kiliman sorry to "bug" you with this, but I've been using @GregBrimble 's excellent github action which makes use of this repo to auto-build tailwindui. I am wondering if you have an idea why his action doesn't work when I add the prefixClasses transformer to the env...and it doesnt seem to build a local css file. It only works if you get tailwind.css from the CDN. Here's the issue I am seeing: GregBrimble/tailwindui-crawler-action#7 (comment)

As an aside, here's how his code is triggering your crawler build:
https://github.com/GregBrimble/tailwindui-crawler-action/blob/f40d23da58140d1271bea395736fd3bf6b3338d3/entrypoint.sh#L54