Skip to content

Commit

Permalink
Add demo workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
timothywarner committed Mar 20, 2024
1 parent 1532a9c commit 9d16fda
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/cll.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
name: Node.js CI/CD

on:
push:
branches: [ main ]
schedule:
- cron: '0 0 * * *' # Scheduled to run every day at midnight
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [12.x, 14.x, 16.x]

steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v1
with:
node-version: ${{ matrix.node-version }}

- name: Install dependencies
run: npm ci

- name: Run tests
run: npm test

deploy:
needs: build
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Setup Node.js
uses: actions/setup-node@v1
with:
node-version: 14.x

- name: Install dependencies
run: npm ci

- name: Build
run: npm run build

- name: Deploy to Cloud
run: |
echo "Deploying to the cloud..."
# Here you would typically have a script or command that deploys your application
# For example:
# npm run deploy

0 comments on commit 9d16fda

Please sign in to comment.