GitHub Classroom Workflow #2719
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# @format | |
name: GitHub Classroom Workflow | |
on: | |
schedule: | |
- cron: '0 */1 * * *' | |
push: | |
branches: | |
- master | |
workflow_dispatch: | |
jobs: | |
build: | |
name: Autograding | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: install nodejs | |
uses: actions/[email protected] | |
with: | |
node-version: '16.x' | |
- name: create env file | |
run: | | |
echo TOKEN=${{ secrets.AUTH_TOKEN }} >> spider/.env | |
echo SESSION_TOKEN=${{ secrets.SESSION_TOKEN }} >> spider/.env | |
- name: install spider pkg and run | |
run: | | |
cd spider && npm install | |
npm run start | |
- name: build beta pages | |
run: | | |
cd web-beta && npm install | |
npm run build | |
npm run export | |
mv out ../build | |
- name: build pages | |
run: | | |
cd web && npm install | |
npm run build | |
cp dist ../build/older_version -r | |
- name: GitHub Pages | |
uses: crazy-max/[email protected] | |
with: | |
target_branch: gh-pages | |
build_dir: build | |
jekyll: false | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |