Skip to content
This repository has been archived by the owner on Jan 15, 2024. It is now read-only.

[Website] Improve website build workflow #1377

Merged
merged 1 commit into from
Sep 30, 2020
Merged
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
31 changes: 21 additions & 10 deletions .github/workflows/buildwebsite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,42 +12,53 @@ jobs:
strategy:
fail-fast: false
steps:
- name: Checkout repository
uses: actions/checkout@v2

- name: Install Linux dependencies
run: |
sudo apt-get install libopenblas-dev texlive texlive-latex-extra pandoc

- name: Setup python
uses: actions/setup-python@v2
with:
python-version: 3.7
architecture: x64

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1

- name: Install Other Dependencies
run: |
python -m pip install --quiet --upgrade pip
python -m pip install --upgrade cython
python -m pip install --pre "mxnet>=2.0.0b20200802" -f https://dist.mxnet.io/python
python -m pip install --quiet -e .[extras]
python -m pip install setuptools ipython sphinx>=1.5.5 sphinx-gallery nbsphinx sphinx_rtd_theme mxtheme sphinx-autodoc-typehints matplotlib Image recommonmark

- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v1
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-east-1
- name: Checkout repository(For push)
if: ${{ github.event_name == 'push' }}
uses: actions/checkout@v2

- name: Compile Notebooks(For push)
if: ${{ github.event_name == 'push' }}
run: |
python -m pip install --quiet -e .[extras]
./tools/batch/batch_states/compile_notebooks.sh \
"push" "${{ github.run_number }}" \
"${{ github.repository }}" "${{ github.ref }}"

- name: Checkout Pull Request Repository(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
uses: actions/checkout@v2
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Compile Notebooks(For pull request)
if: ${{ github.event_name == 'pull_request' || github.event_name == 'pull_request_target' }}
run: |
python -m pip install --quiet -e .[extras]
./tools/batch/batch_states/compile_notebooks.sh \
"#PR-${{ github.event.number }}" "${{ github.run_number }}" \
"${{ github.event.pull_request.head.repo.full_name }}" "${{ github.event.pull_request.head.ref }}"
Expand Down