Skip to content

Refresh GitHub Contribution Data #201

Refresh GitHub Contribution Data

Refresh GitHub Contribution Data #201

Workflow file for this run

name: Refresh GitHub Contribution Data
on:
workflow_dispatch:
schedule:
# (see https://crontab.guru) -> “At 07:00 AM UTC every day.”
- cron: '0 7 * * *'
env:
AWS_DEFAULT_REGION: ${{ secrets.AWS_REGION }}
jobs:
refresh_github:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Cache NPM
uses: actions/setup-node@v3
with:
node-version: '16'
cache: 'npm'
- name: Install
run: npm ci
- name: Reload data
run: node github.mjs
env:
CONTRIBUTION_HISTORY_TOKEN: ${{ secrets.CONTRIBUTION_HISTORY_TOKEN }}
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
role-to-assume: ${{ secrets.AWS_ROLE }}
aws-region: ${{ secrets.AWS_REGION }}
- name: Deploy Contribution File
run: |
aws s3 cp github.json s3://${{ secrets.AWS_S3_BUCKET }}/github.json --content-type "application/json; charset=utf-8"