-
Notifications
You must be signed in to change notification settings - Fork 67
45 lines (43 loc) · 1.39 KB
/
Copy pathdeploy.yaml
File metadata and controls
45 lines (43 loc) · 1.39 KB
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
on:
push:
branches:
- "master"
jobs:
deploy:
name: "Deploy"
runs-on: "ubuntu-latest"
environment:
name: "Dev"
url: ${{ vars.DEPLOY_API_URL }}
defaults:
run:
working-directory: "games"
steps:
- uses: "actions/checkout@v3"
- uses: "actions/setup-node@v3"
with:
node-version: "23.6"
cache-dependency-path: "games/yarn.lock"
- name: "Install dependencies"
run: "yarn install --frozen-lockfile"
- name: "Build"
run: "yarn run build"
- name: "Deploy cover images"
run: |
aws s3 sync ./assets/ "s3://$DO_SPACES_BUCKET/assets/" \
--endpoint-url "https://$DO_SPACES_REGION.digitaloceanspaces.com" \
--acl public-read \
--delete
env:
DO_SPACES_BUCKET: ${{ vars.DO_SPACES_BUCKET }}
DO_SPACES_REGION: ${{ vars.DO_SPACES_REGION }}
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_DEFAULT_REGION: "us-east-1"
AWS_REQUEST_CHECKSUM_CALCULATION: "when_required"
AWS_RESPONSE_CHECKSUM_VALIDATION: "when_required"
- name: "Deploy"
run: "yarn run diff && yarn run deploy"
env:
DEPLOY_API_URL: ${{ vars.DEPLOY_API_URL }}
DEPLOY_API_KEY: ${{ secrets.DEPLOY_API_KEY }}