Merge pull request #52 from keepsimpleio/fix/build #2
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Generate LLMs files | |
| on: | |
| push: | |
| branches: | |
| - dev | |
| permissions: | |
| contents: write | |
| jobs: | |
| generate: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 20 | |
| cache: yarn | |
| - name: Install dependencies | |
| run: yarn install --frozen-lockfile | |
| - name: Copy prod env file | |
| run: | | |
| echo "${{ secrets.ENV_PROD }}" | base64 -d > .env | |
| rm -f .env.local | |
| - name: Generate llms.txt | |
| run: node scripts/generate-llms.mjs | |
| env: | |
| LLMS_MODE: curated | |
| - name: Generate llms-full.txt | |
| run: node scripts/generate-llms.mjs | |
| env: | |
| LLMS_MODE: full | |
| - name: Commit and push generated files | |
| run: | | |
| git config user.name "github-actions" | |
| git config user.email "github-actions@github.com" | |
| git add public/keepsimple_/ | |
| if ! git diff --cached --quiet; then | |
| git commit -m "chore: regenerate llms files" | |
| git push | |
| fi |