Skip to content

Refresh GitHub Contribution Data #533

Refresh GitHub Contribution Data

Refresh GitHub Contribution Data #533

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_ACCOUNT_ID: 590184101838
AWS_REGION: us-east-1
AWS_APP: stevezelek-com
NODE_VERSION: 18
jobs:
refresh_github:
runs-on: ubuntu-latest
permissions:
id-token: write
contents: read
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache NPM
uses: actions/setup-node@v3
with:
node-version: ${{ env.NODE_VERSION }}
cache: 'npm'
- name: Install
run: npm ci
- name: Reload data
run: node github.mjs
env:
CONTRIBUTION_HISTORY_TOKEN: ${{ secrets.CONTRIBUTION_HISTORY_TOKEN }}
- uses: aws-actions/configure-aws-credentials@v4
with:
role-to-assume: arn:aws:iam::${{ env.AWS_ACCOUNT_ID }}:role/${{ env.AWS_APP }}-github-role
aws-region: ${{ env.AWS_REGION }}
mask-aws-account-id: 'no'
- name: Deploy Contribution File
run: |
aws s3 cp github.json s3://${{ env.AWS_APP }}/files/github.json --content-type "application/json; charset=utf-8"