Skip to content

run-daily-report

run-daily-report #760

name: Run Report (Daily)
on:
repository_dispatch:
types:
- run-daily-report
workflow_dispatch:
jobs:
run-report:
runs-on: ubuntu-latest
env:
TZ: "Asia/Tokyo"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 18
cache: "npm"
- name: Install Dependencies
run: npm ci
- name: Run Build
run: npm run build
- name: Run Report (Qiita)
run: node ./dist/main.js
env:
GOOGLE_ANALYTICS_4_PROPERTY_ID: ${{ secrets.GOOGLE_ANALYTICS_4_PROPERTY_ID_QIITA }}
GOOGLE_APPLICATION_CLIENT_EMAIL: ${{ secrets.GOOGLE_APPLICATION_CLIENT_EMAIL }}
GOOGLE_APPLICATION_PRIVATE_KEY: ${{ secrets.GOOGLE_APPLICATION_PRIVATE_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_QIITA }}
DATE_RANGE: daily
- name: Run Report (Zenn)
run: node ./dist/main.js
env:
GOOGLE_ANALYTICS_4_PROPERTY_ID: ${{ secrets.GOOGLE_ANALYTICS_4_PROPERTY_ID_ZENN }}
GOOGLE_APPLICATION_CLIENT_EMAIL: ${{ secrets.GOOGLE_APPLICATION_CLIENT_EMAIL }}
GOOGLE_APPLICATION_PRIVATE_KEY: ${{ secrets.GOOGLE_APPLICATION_PRIVATE_KEY }}
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL_ZENN }}
DATE_RANGE: daily