-
-
Notifications
You must be signed in to change notification settings - Fork 21
39 lines (33 loc) · 1.03 KB
/
release-deploy.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
name: Deploy (CDN)
on:
workflow_dispatch:
inputs:
version:
description: "Version to deploy (eg 1.2.3)"
required: true
type: string
workflow_call:
inputs:
version:
required: true
type: string
jobs:
release-deploy:
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Setup NodeJS
uses: actions/setup-node@v3
with:
node-version-file: '.nvmrc'
# Pull the object-observer version to be deployed
- name: Install
run: npm install -E @gullerya/object-observer@${{ inputs.version }}
# Deploy
- name: Deploy
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_S3_ACCESS }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_S3_SECRET }}
AWS_REGION: eu-central-1
run: aws s3 sync ./node_modules/@gullerya/object-observer/dist/cdn s3://${{ secrets.AWS_LIBS_BUCKET }}/object-observer/${{ inputs.version }} --delete --cache-control public,max-age=172800,immutable