-
Notifications
You must be signed in to change notification settings - Fork 35
70 lines (64 loc) · 1.86 KB
/
deploy-edgeworker.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
69
70
name: EdgeWorker
on:
workflow_dispatch:
inputs:
testCodeBranch:
description: 'Test Code Branch'
required: true
default: 'stage'
type: string
edgeworker:
description: 'Edge Worker'
type: choice
required: true
default: 'Acrobat_DC_web_stg'
options:
- 'Acrobat_DC_web_stg'
- 'Acrobat_DC_web_prod'
network:
description: 'Network'
type: choice
required: true
default: 'staging'
options:
- 'staging'
- 'production'
description:
description: 'Bundle Description'
type: string
required: true
default: 'Bundle Description'
jobs:
deploy-edgeworker:
name: Deploy EdgeWorker
runs-on: ubuntu-latest
steps:
- name: Check out repository
uses: actions/checkout@v3
with:
ref: ${{ inputs.testCodeBranch }}
- name: Cache dependencies
id: cache
uses: actions/cache@v3
with:
path: ./node_modules
key: modules-${{ hashFiles('package-lock.json') }}-${{ runner.os }}
- name: Install dependencies
if: steps.cache.outputs.cache-hit != 'true'
run: npm ci --ignore-scripts
- name: Build Edge Worker Scripts
run: |
npm run ewbuild
npm run ewprod2stg
npm run ewsetbundle ${{ inputs.edgeworker }} "${{ inputs.description }}"
env:
EDGERC: ${{ secrets.AKAMAI_EDGERC }}
- name: Deploy Edge Worker
uses: jdmevo123/akamai-edgeworker-action@1.1
env:
EDGERC: ${{ secrets.AKAMAI_EDGERC }}
WORKER_DIR: edgeworkers/${{ inputs.edgeworker }}
with:
edgeworkersName: ${{ inputs.edgeworker }}
network: ${{ inputs.network }}
groupid: '58544'