Skip to content

RPC Health Check Main #4469

RPC Health Check Main

RPC Health Check Main #4469

name: RPC Health Check Main
on:
schedule:
- cron: "0 6 * * *"
workflow_dispatch:
branches:
- main
inputs:
note:
description: 'Health check'
required: false
default: ''
concurrency: 'main'
jobs:
health-check:
if: "! startsWith(github.event.head_commit.message, '[CI Skip]')"
runs-on: ubuntu-22.04
name: RPC Health Check
steps:
- uses: actions/checkout@v4
with:
ref: main
fetch-depth: 0
token: ${{ secrets.GH_AUTOMATION_TOKEN }}
- name: Set input data
id: input_data
run: |
if [[ ${{ github.ref }} == 'refs/heads/master' ]]; then
echo "target=latest" >> $GITHUB_OUTPUT
else
echo "target=beta" >> $GITHUB_OUTPUT
fi
- uses: actions/setup-node@v3
with:
node-version: '18'
registry-url: 'https://registry.npmjs.org'
- name: Install dependencies
run: |
yarn install
- name: Run scripts
run: |
NODE_ENV=production yarn export-error-rpc
- name: Commit changes
id: commit_changes
uses: EndBug/add-and-commit@v9
with:
author_name: Github-Bot
author_email: [email protected]
message: '[CI Skip] Update error rpcs'
- name: Log commit changes
run: |
echo "pushed: ${{ steps.commit_changes.outputs.pushed }}"
- name: Deploy Assets to Cloudflare Pages
if: steps.commit_changes.outputs.pushed == 'true'
id: cloudflare_deployment
uses: cloudflare/pages-action@v1
with:
apiToken: ${{ secrets.CLOUDFLARE_API_TOKEN }}
accountId: ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
projectName: 'sw-static-cache'
gitHubToken: ${{ secrets.GH_AUTOMATION_TOKEN }}
branch: main
directory: './data'
wranglerVersion: '3'