Skip to content

Update cleavr_ifby4lf9gw.yml #7

Update cleavr_ifby4lf9gw.yml

Update cleavr_ifby4lf9gw.yml #7

# This GitHub Actions workflow is generated and deployed by https://cleavr.io
# The filename, cleavr_ifby4lf9gw, 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 5wgqg73p9tazjobo1646.cleavr.cloud 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.
- master
jobs:
init:
runs-on: ubuntu-latest
steps:
- name: Start Cleavr Deployment
uses: fjogeleit/http-request-action@master
with:
url: '${{ secrets.DEPLOY_TRIGGER_HOOK_cleavr_ifby4lf9gw }}'
method: 'POST'
data: '{"status": "init" }'
timeout: 60000
build:
needs: init
runs-on: ubuntu-22.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
- name: Test node version
id: test-node
run: npm ci --omit="dev"
### --- PLEASE DO NOT MODIFY ANYTHING BELOW THIS LINE --- ###
- name: Generate artifact name
id: artifact
uses: josStorer/[email protected]
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
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_ifby4lf9gw }}'
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 }}"}'