diff --git a/.github/workflows/docker-build.yml b/.github/workflows/docker-build.yml index cd885f5..2bc7782 100644 --- a/.github/workflows/docker-build.yml +++ b/.github/workflows/docker-build.yml @@ -79,8 +79,8 @@ jobs: uses: docker/login-action@v3 with: registry: ${{ env.REGISTRY }} - username: ${{ github.actor }} - password: ${{ secrets.GITHUB_TOKEN }} + username: ${{ secrets.GHCR_USERNAME }} + password: ${{ secrets.GHCR_TOKEN }} - name: Extract metadata (tags, labels) for Docker id: meta diff --git a/.github/workflows/static.yml b/.github/workflows/static.yml deleted file mode 100644 index e96f44d..0000000 --- a/.github/workflows/static.yml +++ /dev/null @@ -1,63 +0,0 @@ -# Simple workflow for deploying static content to GitHub Pages -name: Deploy static content to Pages - -on: - # Runs on pushes targeting the default branch - push: - branches: ["main"] - - # Allows you to run this workflow manually from the Actions tab - workflow_dispatch: - -# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages -permissions: - contents: read - pages: write - id-token: write - -# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. -# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. -concurrency: - group: "pages" - cancel-in-progress: false - -jobs: - # Single deploy job since we're just deploying - deploy: - environment: - name: github-pages - url: ${{ steps.deployment.outputs.page_url }} - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v4 - - name: Set up Node.js - uses: actions/setup-node@v4 - with: - node-version: 22 - cache: npm - - name: Install dependencies - run: npm ci - - name: Generate OpenAPI spec - # Refresh public/openapi.json from the live route schemas so the - # published API reference can never drift from the deployed code. - run: npm run openapi - - name: Refresh offline data snapshot - # Best-effort: pull a fresh /summary from the live API so the - # dashboard's last-resort fallback isn't stale. Keeps the committed - # copy when the API is unreachable at deploy time. - run: | - curl -sf --max-time 30 https://chains-api.riv-dev1.pinax.io/summary -o /tmp/summary.json \ - && node -e "JSON.parse(require('fs').readFileSync('/tmp/summary.json','utf8'))" \ - && mv /tmp/summary.json public/summary.json \ - || echo "Live /summary unavailable — keeping committed snapshot" - - name: Setup Pages - uses: actions/configure-pages@v5 - - name: Upload artifact - uses: actions/upload-pages-artifact@v3 - with: - # Upload entire repository - path: './public' - - name: Deploy to GitHub Pages - id: deployment - uses: actions/deploy-pages@v4 diff --git a/CLAUDE.md b/CLAUDE.md index 8cfcf97..7cf0549 100644 --- a/CLAUDE.md +++ b/CLAUDE.md @@ -158,9 +158,8 @@ See `config.js` and `.env.example` for the full list. GitHub Actions workflows in `.github/workflows/`: 1. **`docker-build.yml`** — On pull requests, `main`, version tags, or manual dispatch: lints, tests with coverage, checks OpenAPI drift, and publishes amd64/arm64 images to `ghcr.io/pinax-network/chains-api` outside pull requests. -2. **`static.yml`** — Publishes the dashboard and generated OpenAPI reference to GitHub Pages. -3. **`auto-tag.yml`** — Creates a version tag when `package.json` changes on `main`. -4. **`refresh-l2beat-fallback.yml`** — Refreshes the checked-in L2BEAT fallback weekly through a pull request. +2. **`auto-tag.yml`** — Creates a version tag when `package.json` changes on `main`. +3. **`refresh-l2beat-fallback.yml`** — Refreshes the checked-in L2BEAT fallback weekly through a pull request. ## Docker