Skip to content

Update bhlist.co.in icon (#84) #41

Update bhlist.co.in icon (#84)

Update bhlist.co.in icon (#84) #41

Workflow file for this run

name: Deploy
on:
push:
branches:
- master
workflow_dispatch:
jobs:
test:
name: Test
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Read .nvmrc
run: echo "##[set-output name=NVMRC;]$(cat .nvmrc)"
id: nvm
- name: Use Node.js (.nvmrc)
uses: actions/setup-node@v2
with:
node-version: ${{ steps.nvm.outputs.NVMRC }}
- uses: actions/cache@v2
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Install Dependencies
run: npm ci
- name: Run Tests
run: npm test
deploy:
name: Deploy
needs: test
runs-on: ubuntu-latest
steps:
- name: Trigger Website Staging Deployment
uses: actions/github-script@v5
with:
github-token: ${{ secrets.USER_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'botblock',
repo: 'static-site',
workflow_id: 'deployment-staging.yml',
ref: 'staging',
});
- name: Trigger Website Production Deployment
uses: actions/github-script@v5
with:
github-token: ${{ secrets.USER_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'botblock',
repo: 'static-site',
workflow_id: 'deployment-production.yml',
ref: 'production',
});
- name: Trigger API Staging Deployment
uses: actions/github-script@v5
with:
github-token: ${{ secrets.USER_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'botblock',
repo: 'api-worker',
workflow_id: 'deployment-staging.yml',
ref: 'staging',
});
- name: Trigger API Production Deployment
uses: actions/github-script@v5
with:
github-token: ${{ secrets.USER_TOKEN }}
script: |
await github.rest.actions.createWorkflowDispatch({
owner: 'botblock',
repo: 'api-worker',
workflow_id: 'deployment-production.yml',
ref: 'production',
});