Update site favicon #69
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
# GH actions. | |
name: Build_Deploy | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
workflow_dispatch: | |
jobs: | |
Build: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
steps: | |
- uses: actions/checkout@v2 | |
with: | |
submodules: 'recursive' | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
activate-environment: mlc | |
environment-file: static/build.yml | |
- name: Conda info | |
run: | | |
conda info | |
conda list | |
- name: Install dependencies | |
run: | | |
conda install pandoc | |
pip install git+https://github.com/d2l-ai/d2l-book | |
- name: Build | |
run: | | |
d2lbook build html | |
- name: Site-Checkout | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.MLC_GITHUB_TOKEN }} | |
run: | | |
git clone https://$GITHUB_TOKEN@github.com/mlc-ai/zh | |
cd zh | |
git config user.name mlc-bot | |
git config user.email 106439794+mlc-bot@users.noreply.github.com | |
cd .. | |
- name: Deploy | |
if: github.ref == 'refs/heads/main' | |
env: | |
GITHUB_TOKEN: ${{ secrets.MLC_GITHUB_TOKEN }} | |
run: | | |
python static/update_site.py --site-path zh --source-path _build/html |