Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
38 changes: 38 additions & 0 deletions .github/workflows/github-action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Adapt Framework deployment

on:
push:
branches: [ master ]

jobs:
build:

runs-on: ubuntu-latest

strategy:
matrix:
node-version: [10.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 install
- name: Install cli tools
run: npm install -g grunt-cli adapt-cli
- name: Install adapt plugins
run: adapt install
- name: Generate build
run: grunt build
- name: Deploy build
run: |
git config --global user.name ${{secrets.USERNAME}}
git config --global user.email ${{secrets.EMAIL}}
git remote set-url origin https://${{secrets.ACCESS_TOKEN}}@github.com/${{secrets.USERNAME}}/adapt_framework.git
npm run deploy
6 changes: 4 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,8 @@
"url": "git://github.com/adaptlearning/adapt_framework.git"
},
"scripts": {
"lint": "node node_modules/eslint/bin/eslint.js ./"
"lint": "node node_modules/eslint/bin/eslint.js ./",
"deploy": "gh-pages -d build"
},
"authoringTool": ">=0.8",
"license": "GPL-3.0",
Expand Down Expand Up @@ -60,6 +61,7 @@
"eslint-plugin-node": "^9.1.0",
"eslint-plugin-promise": "^4.2.1",
"eslint-plugin-requirejs": "^4.0.0",
"eslint-plugin-standard": "^4.0.0"
"eslint-plugin-standard": "^4.0.0",
"gh-pages": "^1.2.0"
}
}