-
Notifications
You must be signed in to change notification settings - Fork 918
42 lines (33 loc) · 1023 Bytes
/
build-site.yaml
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
42
name: Build site and push to gh-pages
on:
push:
branches:
- main
jobs:
build:
name: Build site
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Configuring build Environment
run: |
sudo apt-get update
python -m pip install -U pip
- name: Setup Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
- name: Installing dependencies
run: |
python -m pip install -r docs/requirements.txt
gem install jekyll jekyll-remote-theme jekyll-sass-converter
- name: Build site
run: |
cd site && jekyll b && cd ..
- name: Push to gh-pages branch
if: github.ref == 'refs/heads/main'
run: |
git remote set-url origin https://x-access-token:${{ secrets.MLC_GITHUB_TOKEN }}@github.com/$GITHUB_REPOSITORY
git config --global user.email "mlc-gh-actions-bot@nomail"
git config --global user.name "mlc-gh-actions-bot"
./scripts/gh_deploy_site.sh