Skip to content

Commit

Permalink
ci: automatic deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
dlothian committed Oct 30, 2023
1 parent 5877e63 commit eb6a1b9
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
# template from https://github.com/JamesIves/github-pages-deploy-action/tree/dev

name: CI

run-name: Deployment Triggered - ${{ github.event.workflow_run.conclusion == 'success'}}

on:
workflow_run:
workflows: ["Run tests"]
types:
- completed

jobs:
build-and-deploy:
#concurrency: ci-${{ github.ref }} # Recommended if you intend to make multiple deployments in quick succession.
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'success' }}
steps:
- name: Checkout 🛎️
uses: actions/checkout@v3
with:
persist-credentials: false

- name: Install and Build 🔧
run: |
npm install
npm run-script build
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
with:
ACCESS_TOKEN: ${{ secrets.ACCESS_TOKEN }}
folder: dist/word-weaver # The folder the action should deploy.

on-failure:
name: Validation Failed
runs-on: ubuntu-latest
if: ${{ github.event.workflow_run.conclusion == 'failure' }}
steps:
- run: echo "Tests conclusion was failure. Deployment not ran."

0 comments on commit eb6a1b9

Please sign in to comment.