Make AzureML examples more self-contained #996
Workflow file for this run
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
name: Build and deploy | |
on: | |
push: | |
tags: | |
- "*" | |
branches: | |
- main | |
pull_request: | |
# Required shell entrypoint to have properly activated conda environments | |
defaults: | |
run: | |
shell: bash -l {0} | |
permissions: | |
id-token: write | |
contents: read | |
jobs: | |
conda: | |
name: Build (and deploy) | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Set up Python | |
uses: conda-incubator/setup-miniconda@v3 | |
with: | |
activate-environment: deployment-docs-dev | |
environment-file: conda/environments/deployment_docs.yml | |
miniforge-version: latest | |
- name: Build | |
env: | |
DEPLOYMENT_DOCS_BUILD_STABLE: ${{ startsWith(github.event.ref, 'refs/tags/') && 'true' || 'false' }} | |
run: make dirhtml SPHINXOPTS="-W --keep-going -n" | |
- uses: aws-actions/configure-aws-credentials@v4 | |
if: ${{ github.repository == 'rapidsai/deployment' && github.event_name == 'push' }} | |
with: | |
role-to-assume: ${{ vars.AWS_ROLE_ARN }} | |
aws-region: ${{ vars.AWS_REGION }} | |
role-duration-seconds: 3600 # 1h | |
- name: Sync HTML files to S3 | |
if: ${{ github.repository == 'rapidsai/deployment' && github.event_name == 'push' }} | |
env: | |
DESTINATION_DIR: ${{ startsWith(github.event.ref, 'refs/tags/') && 'stable' || 'nightly' }} | |
run: aws s3 sync --no-progress --delete build/dirhtml "s3://rapidsai-docs/deployment/html/${DESTINATION_DIR}" |