diff --git a/.github/workflows/cleavr_k60c6s122s.yml b/.github/workflows/cleavr_k60c6s122s.yml new file mode 100644 index 0000000..d3e1290 --- /dev/null +++ b/.github/workflows/cleavr_k60c6s122s.yml @@ -0,0 +1,80 @@ + + +# This GitHub Actions workflow is generated and deployed by https://cleavr.io +# The filename, cleavr_k60c6s122s, 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 oooooooo.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_k60c6s122s }}' + 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 --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 + + 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_k60c6s122s }}' + 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 }}"}' +