diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml new file mode 100644 index 000000000..8f1d037a7 --- /dev/null +++ b/.github/workflows/build-and-deploy.yml @@ -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 + diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 74d90d999..7231637c5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -16,7 +16,7 @@ jobs: - uses: actions/setup-node@v4 with: - node-version: '16' + node-version: 'lts/*' cache: 'npm' - name: Installing Environment