feat(blog): add blog foundation, seed article, rss, sitemap, llms.txt… #63
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: ci | |
| on: | |
| push: | |
| branches: [master] | |
| pull_request: | |
| # A second push to the same branch makes the first run pointless. | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| core: | |
| name: rust core | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| # Only the library tests run here. Building the bundled app needs the full | |
| # GTK/WebKit toolchain and is left to the release workflow. | |
| - uses: dtolnay/rust-toolchain@stable | |
| with: | |
| targets: wasm32-unknown-unknown | |
| - uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: app/src-tauri | |
| - name: Install Tauri system dependencies | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y libwebkit2gtk-4.1-dev libgtk-3-dev librsvg2-dev \ | |
| libayatana-appindicator3-dev libxdo-dev libssl-dev libdbus-1-dev patchelf | |
| - run: cargo test --manifest-path core/Cargo.toml | |
| - run: cargo test --manifest-path app/src-tauri/Cargo.toml | |
| # The whole point of the core crate is that a browser build can use it. | |
| # If this stops compiling, that option has quietly been lost. | |
| - name: Core still builds for the browser | |
| run: cargo check --manifest-path core/Cargo.toml --target wasm32-unknown-unknown | |
| app: | |
| name: app front end | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: app/package-lock.json | |
| - run: npm ci | |
| working-directory: app | |
| # `npm run build` is tsc followed by vite, so this covers both. | |
| - run: npm run build | |
| working-directory: app | |
| worker: | |
| name: api worker | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: worker/package-lock.json | |
| - run: npm ci | |
| working-directory: worker | |
| - run: npm run check | |
| working-directory: worker | |
| # The suite stubs the network — no provider key is needed and nothing | |
| # leaves the runner. | |
| - run: npm test | |
| working-directory: worker | |
| site: | |
| name: site | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: site/package-lock.json | |
| - run: npm ci | |
| working-directory: site | |
| - run: npm run build | |
| working-directory: site | |
| deploy: | |
| name: deploy site and api to cloudflare | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/master' | |
| needs: [site, worker] | |
| runs-on: ubuntu-latest | |
| env: | |
| CLOUDFLARE_ACCOUNT_ID: "94659721edab2c56629832072970499f" | |
| CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - uses: actions/setup-node@v5 | |
| with: | |
| node-version: 22 | |
| cache: npm | |
| cache-dependency-path: "**/package-lock.json" | |
| - name: Deploy site | |
| working-directory: site | |
| run: | | |
| npm ci | |
| npm run deploy | |
| - name: Deploy api worker | |
| working-directory: worker | |
| run: | | |
| npm ci | |
| npm run deploy |