Update Session Data #19
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: Update Session Data | |
on: | |
schedule: | |
- cron: "0 * * * *" | |
workflow_dispatch: | |
permissions: | |
id-token: write | |
env: | |
COSCUP_YEAR: '2024' | |
COSCUP_DAYS: '["2024-08-03","2024-08-04"]' | |
COSCUP_TIMEZONE: '+08:00' | |
jobs: | |
update: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Install pnpm | |
uses: pnpm/action-setup@v4 | |
with: | |
version: "latest" | |
- name: Setup Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 20 | |
cache: "pnpm" | |
- name: Configure AWS credentials | |
uses: aws-actions/configure-aws-credentials@v4 | |
with: | |
role-to-assume: arn:aws:iam::780365179946:role/my-github-actions-role | |
aws-region: ap-northeast-1 | |
- name: Install dependencies | |
run: pnpm install | |
- name: Update data | |
run: pnpm run start | |
- name: Upload data to AWS S3 bucket | |
run: aws s3 cp ./data/data.json s3://coscup-sf-data/data.json |