forked from LearningOS/rust-rustlings-ranking
-
Notifications
You must be signed in to change notification settings - Fork 1
41 lines (39 loc) · 1022 Bytes
/
gh-pages.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
# @format
name: GitHub Classroom Workflow
on:
schedule:
- cron: '*/12 * * * *'
push:
branches:
- main
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 pages
run: |
cd web && npm install && npm run build
mv dist ../build
- name: GitHub Pages
uses: crazy-max/[email protected]
with:
target_branch: gh-pages
build_dir: build
jekyll: false
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}