pashto-dictionary/.github/workflows/deploy-functions.yml

46 lines
1.4 KiB
YAML
Raw Normal View History

2024-11-28 09:31:59 +00:00
name: Deploy Functions
2024-11-28 09:29:24 +00:00
on:
push:
branches:
- master
paths:
- "functions/**"
- ".github/workflows/deploy-functions.yml"
workflow_dispatch:
jobs:
aws_cdk:
runs-on: ubuntu-latest
steps:
2024-11-28 09:42:57 +00:00
- name: Checkout repository
2024-11-28 09:50:05 +00:00
uses: actions/checkout@v4
2024-11-28 10:14:45 +00:00
- uses: actions/setup-node@v4
2024-11-28 09:29:24 +00:00
with:
2024-11-28 10:14:45 +00:00
node-version: 20
cache: "npm"
- name: Install AWS CDK
run: npm install -g aws-cdk
2024-11-28 10:15:56 +00:00
- name: CDK Deploy
2024-11-28 10:14:45 +00:00
run: |
2024-11-28 10:15:56 +00:00
npm install
cd website
npm install
cd ../account
npm install
cd ../functions
npm install
2024-11-28 10:14:45 +00:00
cdk deploy --require-approval never
2024-11-28 09:29:24 +00:00
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
2024-11-28 09:55:30 +00:00
LINGDOCS_DICTIONARY_SPREADSHEET: ${{ secrets.LINGDOCS_DICTIONARY_SPREADSHEET }}
LINGDOCS_DICTIONARY_SHEET_ID: ${{ secrets.LINGDOCS_DICTIONARY_SHEET_ID }}
LINGDOCS_SERVICE_ACCOUNT_EMAIL: ${{ secrets.LINGDOCS_SERVICE_ACCOUNT_EMAIL }}
LINGDOCS_SERVICE_ACCOUNT_KEY: ${{ secrets.LINGDOCS_SERVICE_ACCOUNT_KEY }}
DICT_R2_ENDPOINT: ${{ secrets.DICT_R2_ENDPOINT }}
DICT_R2_KEY_ID: ${{ secrets.DICT_R2_KEY_ID }}
DICT_R2_KEY_SECRET: ${{ secrets.DICT_R2_KEY_SECRET }}
DICT_R2_BUCKET: ${{ secrets.DICT_R2_BUCKET }}