-
Notifications
You must be signed in to change notification settings - Fork 0
78 lines (70 loc) · 2.54 KB
/
cleavr_1e8oego0ma.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
71
72
73
74
75
76
77
78
# This GitHub Actions workflow is generated and deployed by https://cleavr.io
# The filename, cleavr_1e8oego0ma, of this workflow is tracked from within Cleavr,
# please don't change the name. Though, feel free to add your own steps or tweak
# the existing ones except anything listed below the warning message.
# Read more about Cleavr's GitHub Actions integration feature at: https://docs.cleavr.io/github-actions
name: Deploy cms.adocasts.com App with Cleavr
on:
workflow_dispatch:
push:
branches:
# This is the branch that gets deployed when a push is made to this repository.
# If you change the default branch in Cleavr under the Webapp's settings, make sure to change it here as well.
- main
jobs:
init:
runs-on: ubuntu-latest
steps:
- name: Start Cleavr Deployment
uses: fjogeleit/http-request-action@master
with:
url: '${{ secrets.DEPLOY_TRIGGER_HOOK_cleavr_1e8oego0ma }}'
method: 'POST'
data: '{"status": "init" }'
timeout: 60000
build:
needs: init
runs-on: ubuntu-20.04
outputs:
cleavr-step-status: ${{ toJson(steps) }}
artifact-formatted-time: ${{ steps.artifact.outputs.formattedTime }}
steps:
- uses: actions/checkout@v3
id: checkout
- uses: actions/setup-node@v3
id: setup-node
with:
node-version: '20'
- uses: bahmutov/npm-install@v1
id: npm-install
- name: Build app
id: build-app
run: npm run build --production
### --- PLEASE DO NOT MODIFY ANYTHING BELOW THIS LINE --- ###
- name: Generate artifact name
id: artifact
uses: josStorer/get-current-time@v2.0.2
with:
format: YYYYMMDDHHmmss
utcOffset: '+08:00'
- name: Upload artifact
id: upload-artifact
uses: actions/upload-artifact@v3
with:
name: '${{ steps.artifact.outputs.formattedTime }}'
path: build/
if-no-files-found: error
include-hidden-files: true
complete:
if: always()
needs: build
runs-on: ubuntu-latest
steps:
- name: Complete Cleavr Deployment
uses: fjogeleit/http-request-action@master
with:
url: '${{ secrets.DEPLOY_TRIGGER_HOOK_cleavr_1e8oego0ma }}'
method: 'POST'
data: '{"status": "${{ needs.build.result }}" , "steps": ${{ toJson(needs.build.outputs.cleavr-step-status) }} }'
timeout: 60000
customHeaders: '{"artifact": "${{ needs.build.outputs.artifact-formatted-time }}"}'