generate-weekly-ranking #38
This file contains 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: generate-weekly-ranking | |
on: | |
schedule: | |
- cron: '0 15 * * 0' | |
workflow_dispatch: | |
jobs: | |
build: | |
permissions: | |
id-token: write | |
contents: write | |
pull-requests: write | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up Node.js environment | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '20' | |
cache: npm | |
cache-dependency-path: scripts/package-lock.json | |
- name: Install | |
run: cd ${GITHUB_WORKSPACE}/scripts && npm ci | |
- name: configure google credentials | |
uses: google-github-actions/auth@v2 | |
with: | |
workload_identity_provider: ${{ vars.GCP_IDENTITY_PROVIDER }} | |
service_account: ${{ vars.GCP_SERVICE_ACCOUNT }} | |
- name: Generate GA PageView report | |
id: generate-ga-pv-report | |
env: | |
GA_PROPERTY_ID: ${{ secrets.GA_PROPERTY_ID }} | |
SLACK_BOT_TOKEN: ${{ secrets.SLACK_BOT_TOKEN }} | |
SLACK_CHANNEL_ID: ${{ vars.MAIN_SLACK_CHANNEL_ID }} | |
run: | | |
cd ${GITHUB_WORKSPACE}/scripts | |
npm run generate:weekly-ranking | |
- name: Commit and Create Pull request | |
uses: peter-evans/create-pull-request@v6 | |
with: | |
commit-message: "feat: Add PV ranking report" | |
add-paths: "src/_data" | |
author: "mameka <[email protected]>" | |
branch: weekly-ranking-report | |
delete-branch: true | |
title: "[auto-review] Update GA Report by github-actions" | |
body: "Check weekly access ranking report." | |
reviewers: kudoh | |
labels: bot |