Skip to content

Update Session Data #28

Update Session Data

Update Session Data #28

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