Mirror of
0
fork

Configure Feed

Select the types of activity you want to include in your feed.

feat: update CI and README

+15 -159
+4 -3
.github/workflows/generate-post.yml
··· 1 - name: Generate Daily/Nightly Post 1 + name: Generate Daily/Midday/Nightly Post 2 2 3 3 on: 4 4 schedule: 5 5 - cron: "0 6 * * *" 6 + - cron: "0 14 * * *" 6 7 - cron: "0 22 * * *" 7 8 workflow_dispatch: 8 9 ··· 22 23 - name: Setup Node.js 23 24 uses: actions/setup-node@v4 24 25 with: 25 - node-version: "20" 26 + node-version: "24" 26 27 cache: "pnpm" 27 28 28 29 - name: Install dependencies ··· 36 37 - name: Commit and push new post 37 38 uses: stefanzweifel/git-auto-commit-action@v5 38 39 with: 39 - commit_message: "chore: add digest [skip ci]" 40 + commit_message: "chore: add digest" 40 41 file_pattern: "src/content/posts/*.json" 41 42 commit_user_name: "github-actions[bot]" 42 43 commit_user_email: "github-actions[bot]@users.noreply.github.com"
+11 -156
README.md
··· 1 1 # ๐Ÿ“ฐ npmx-digest 2 2 3 - An automated news aggregation website that summarizes npmx activity from GitHub and Bluesky every 12 hours. 3 + [![Built with Astro](https://img.shields.io/badge/built%20with-Astro-ff5d01.svg)](https://astro.build) 4 + 5 + An automated news aggregation website that summarizes [**npmx**](https://repo.npmx.dev) activity from GitHub and Bluesky every 12 hours. 6 + 7 + ## โšก Report Cycle 8 + 9 + The system generates reports three times daily: 10 + 11 + * **Daily** (`07:00 CET`) โ€“ Morning snapshot. 12 + * **Midday** (`15:00 CET`) โ€“ Progress update. 13 + * **Nightly** (`23:00 CET`) โ€“ Day end post-mortem. 4 14 5 15 ## โœจ Features 6 16 ··· 9 19 - ๐ŸŽจ **Beautiful Minimalist Design** - Clean, modern interface with no framework dependencies 10 20 - ๐Ÿ“ฑ **Fully Responsive** - Works perfectly on all devices 11 21 - ๐Ÿ”„ **Automated** - GitHub Actions handles everything automatically 12 - 13 - ## ๐Ÿš€ Quick Start 14 - 15 - ### Prerequisites 16 - 17 - - Node.js 24+ installed 18 - - GitHub account 19 - - (Optional) Bluesky account for Bluesky integration 20 - 21 - ### Installation 22 - 23 - 1. **Clone and install dependencies:** 24 - 25 - ```bash 26 - cd npmx-digest 27 - pnpm install 28 - ``` 29 - 30 - 2. **Set up environment variables:** 31 - 32 - Create a `.env` file in the root directory: 33 - 34 - ```env 35 - # Required for AI summaries and GitHub API 36 - GITHUB_TOKEN=your_github_token_here 37 - ``` 38 - 39 - 3. **Run development server:** 40 - 41 - ```bash 42 - pnpm dev 43 - ``` 44 - 45 - Visit `http://localhost:4321` to see your site! 46 - 47 - ## ๐Ÿ› ๏ธ Commands 48 - 49 - | Command | Description | 50 - |---------|-------------| 51 - | `pnpm dev` | Start development server | 52 - | `pnpm build` | Build for production | 53 - | `pnpm preview` | Preview production build | 54 - | `pnpm generate` | Manually generate a new post | 55 - 56 - ## ๐Ÿ“ Manual Post Generation 57 - 58 - To create a post manually: 59 - 60 - ```bash 61 - pnpm generate 62 - ``` 63 - 64 - This will: 65 - 1. Fetch events from GitHub and Bluesky from the last 12 hours 66 - 2. Generate an AI summary using GitHub Models 67 - 3. Create a JSON file in `src/content/posts/` 68 - 4. Automatically determine if it's a "daily" or "nightly" post based on current time 69 - 70 - ## โš™๏ธ GitHub Actions Setup 71 - 72 - The site automatically generates posts using GitHub Actions. To set this up: 73 - 74 - 1. **Enable GitHub Actions** in your repository settings 75 - 76 - 2. **Add repository secrets:** 77 - - Go to Settings โ†’ Secrets and variables โ†’ Actions 78 - - Add the following secrets: 79 - - `GITHUB_TOKEN` (automatically provided by GitHub) 80 - 81 - 3. **Enable GitHub Pages (optional):** 82 - - Go to Settings โ†’ Pages 83 - - Source: GitHub Actions 84 - - Your site will be deployed automatically after each post generation 85 - 86 - The workflow runs automatically at: 87 - - **07:00 CET** (daily post) 88 - - **23:00 CET** (nightly post) 89 - 90 - You can also trigger it manually from the Actions tab. 91 - 92 - ## ๐Ÿ”‘ Getting Tokens 93 - 94 - ### GitHub Token 95 - 96 - 1. Go to GitHub Settings โ†’ Developer settings โ†’ Personal access tokens โ†’ Tokens (classic) 97 - 2. Generate new token with `repo` scope 98 - 3. Copy and save the token 99 - 100 - ### Bluesky 101 - 102 - No authentication needed! The public API is used to fetch posts. 103 - 104 - ## ๐ŸŽจ Customization 105 - 106 - ### Styling 107 - 108 - All styles are inline CSS using CSS custom properties. To customize colors, edit the `:root` variables in `src/layouts/Layout.astro`: 109 - 110 - ```css 111 - :root { 112 - --bg-primary: #0a0a0a; 113 - --bg-secondary: #151515; 114 - --accent: #3b82f6; 115 - /* ... more variables ... */ 116 - } 117 - ``` 118 - 119 - ### Post Schedule 120 - 121 - To change when posts are generated, edit `.github/workflows/generate-post.yml`: 122 - 123 - ```yaml 124 - schedule: 125 - - cron: '0 6 * * *' # 07:00 CET (daily) 126 - - cron: '0 22 * * *' # 23:00 CET (nightly) 127 - ``` 128 - 129 - ### Sources 130 - 131 - To add or modify data sources, edit `src/lib/utils.ts` and add new fetch functions. 132 - 133 - ## ๐Ÿ› Troubleshooting 134 - 135 - **Posts not generating:** 136 - - Check GitHub Actions logs in the Actions tab 137 - - Verify environment variables are set correctly 138 - - Ensure GitHub token has necessary permissions 139 - 140 - **No events showing:** 141 - - Verify the GitHub repository exists and is accessible 142 - - Ensure Bluesky handle is correct 143 - 144 - **Build fails:** 145 - - Run `npm run build` locally to see errors 146 - - Check that all dependencies are installed 147 - - Verify Node.js version is 18+ 148 - 149 - ## ๐Ÿ“„ License 150 - 151 - MIT License - feel free to use this for your own projects! 152 - 153 - ## ๐Ÿค Contributing 154 - 155 - Contributions are welcome! Please feel free to submit a Pull Request. 156 - 157 - ## ๐Ÿ’ก Tips 158 - 159 - - The first time you run the site, there will be no posts. Run `npm run generate` to create one. 160 - - Posts are stored as JSON files in `src/content/posts/` - you can manually edit them if needed. 161 - - The AI summary quality depends on the events found. More events = better summaries! 162 - - GitHub Models uses the `gpt-4o-mini` model by default for cost efficiency. 163 - 164 - --- 165 - 166 - Built with [Astro](https://astro.build) ๐Ÿš€