-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (48 loc) · 1.25 KB
/
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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
name: Deploy
on:
push:
branches:
- main
env:
AWS_APP: stevezelek-com
NODE_VERSION: 18
BUILD_DIR: public
CLOUDFLARE_ZONE: c272b1a950675498138a374bcbf3fe0f
jobs:
env:
runs-on: ubuntu-latest
outputs:
AWS_APP: ${{ env.AWS_APP }}
NODE_VERSION: ${{ env.NODE_VERSION }}
BUILD_DIR: ${{ env.BUILD_DIR }}
CLOUDFLARE_ZONE: ${{ env.CLOUDFLARE_ZONE }}
steps:
- run: echo ""
build:
needs: [env]
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Cache NPM
uses: actions/setup-node@v4
with:
node-version: ${{ needs.env.outputs.NODE_VERSION }}
cache: 'npm'
- name: Install
run: |
npm ci
npm run build:app
- name: Upload app artifact
uses: actions/upload-artifact@v4
with:
name: ${{ needs.env.outputs.AWS_APP }}
path: ${{ needs.env.outputs.BUILD_DIR }}/*
deploy-app:
needs: [env, build]
uses: smzelek/aws-hosting/.github/workflows/deploy-app.yml@main
secrets: inherit
with:
aws-app: ${{ needs.env.outputs.AWS_APP }}
app-artifact: ${{ needs.env.outputs.AWS_APP }}
cloudflare-zone: ${{ needs.env.outputs.CLOUDFLARE_ZONE }}