diff --git a/.github/workflows/buildwebsite.yml b/.github/workflows/buildwebsite.yml index aa14edc22f..9881828d3c 100644 --- a/.github/workflows/buildwebsite.yml +++ b/.github/workflows/buildwebsite.yml @@ -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 }}"