-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (63 loc) · 2.27 KB
/
cloud.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Cloud
on:
push: # Runs on pushes targeting the default branch
branches:
- main
paths:
- 'cloud/**'
- '.github/workflows/cloud.yml'
workflow_dispatch: # Allows you to run this workflow manually from the Actions tab
jobs:
deploy_to_dev:
name: Deploy to Development
environment: development
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Deploy to Development
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
OMDB_API_KEY: ${{ secrets.OMDB_API_KEY }}
GOOGLE_CUSTOM_SEARCH_ID: ${{ secrets.GOOGLE_CUSTOM_SEARCH_ID }}
GOOGLE_CUSTOM_SEARCH_API_KEY: ${{ secrets.GOOGLE_CUSTOM_SEARCH_API_KEY }}
DYNAMODB_MOVIE_METADATA: ${{ secrets.DYNAMODB_MOVIE_METADATA }}
SCRAPERS: ${{ vars.SCRAPERS }}
run: |
cd cloud/
yarn deploy:ci --stage dev
deploy_to_production:
name: Deploy to Production
environment: production
runs-on: ubuntu-latest
needs: [deploy_to_dev]
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
cache: 'yarn'
- name: Install Dependencies
run: yarn install --frozen-lockfile
- name: Deploy to Production
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
TMDB_API_KEY: ${{ secrets.TMDB_API_KEY }}
OMDB_API_KEY: ${{ secrets.OMDB_API_KEY }}
GOOGLE_CUSTOM_SEARCH_ID: ${{ secrets.GOOGLE_CUSTOM_SEARCH_ID }}
GOOGLE_CUSTOM_SEARCH_API_KEY: ${{ secrets.GOOGLE_CUSTOM_SEARCH_API_KEY }}
DYNAMODB_MOVIE_METADATA: ${{ secrets.DYNAMODB_MOVIE_METADATA }}
SCRAPERS: ${{ vars.SCRAPERS }}
run: |
cd cloud/
yarn deploy:ci --stage prod