Skip to content

Commit

Permalink
Update deployment script and add environment variables
Browse files Browse the repository at this point in the history
  • Loading branch information
timothywarner committed Mar 20, 2024
1 parent 9d16fda commit d282025
Show file tree
Hide file tree
Showing 2 changed files with 28 additions and 53 deletions.
66 changes: 13 additions & 53 deletions .github/workflows/cll.yml
Original file line number Diff line number Diff line change
@@ -1,53 +1,13 @@
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
- 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
# Use the GitHub token to perform actions on GitHub
echo "Using GitHub token to perform actions on GitHub..."
# For example, to list the repositories for the authenticated user:
# curl -H "Authorization: token $GITHUB_TOKEN" https://api.github.com/user/repos
env:
CLOUD_PROVIDER_API_KEY: ${{ secrets.CLOUD_PROVIDER_API_KEY }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
15 changes: 15 additions & 0 deletions .github/workflows/links.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
name: Check Links

on:
workflow_dispatch:

jobs:
linkChecker:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2

- name: Check links in README.md
uses: lycheeverse/[email protected]
with:
args: ./README.md

0 comments on commit d282025

Please sign in to comment.