Skip to content
35 changes: 35 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
name: Build and Deploy to GitHub Pages

on:
workflow_dispatch:
release:
types: [published]
schedule:
- cron: '0 7 * * 2' # Runs every Tuesday at midnight MST (7am UTC)

jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: 'lts/*'

- name: Install dependencies
run: npm ci

- name: Build course
run: grunt build

- name: Deploy to GitHub Pages
uses: peaceiris/actions-gh-pages@v4
with:
deploy_key: ${{ secrets.RELEASES_TOKEN }}
external_repository: adaptlearning/adaptlearning.github.io
publish_branch: master
publish_dir: ./build
destination_dir: v5demo

2 changes: 1 addition & 1 deletion .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ jobs:

- uses: actions/setup-node@v4
with:
node-version: '16'
node-version: 'lts/*'
cache: 'npm'

- name: Installing Environment
Expand Down