Skip to content

Merge pull request #350 from Twinsteak/dev #34

Merge pull request #350 from Twinsteak/dev

Merge pull request #350 from Twinsteak/dev #34

Workflow file for this run

name: Deploy to AWS
on:
workflow_dispatch:
push:
branches:
- main
jobs:
build:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.10"
- uses: actions/setup-node@v4
with:
node-version: 21
- uses: aws-actions/setup-sam@v2
- uses: aws-actions/configure-aws-credentials@v4
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: ap-northeast-2
- name: Install pnpm
uses: pnpm/action-setup@v4
with:
version: 9
run_install: false
- name: Get pnpm store directory
id: pnpm-cache
run: |
echo "::set-output name=pnpm_cache_dir::$(pnpm store path)"
- name: Setup pnpm cache
uses: actions/cache@v4
with:
path: ${{ steps.pnpm-cache.outputs.pnpm_cache_dir }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Install Dependencies
run: pnpm install --frozen-lockfile
- name: Install Global dependencies
run: pnpm install --global concurrently cross-env
- name: Build
run: pnpm build
- name: Deploy server
run: pnpm -r --filter=server run deploy --parameter-overrides "JwtSecret=\"${{ secrets.JWT_SECRET }}\" SsutodaySecret=\"${{ secrets.SSUTODAY_SECRET }}\""
- name: Deploy client
run: pnpm -r --filter=client run deploy