-
Notifications
You must be signed in to change notification settings - Fork 31
52 lines (45 loc) · 1.54 KB
/
build-and-deploy.yml
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
43
44
45
46
47
48
49
50
51
52
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/[email protected]
with:
fetch-depth: 0
- name: Set up Python
uses: conda-incubator/setup-miniconda@v2
with:
miniforge-variant: Mambaforge
use-mamba: true
activate-environment: deployment-docs-dev
environment-file: conda/environments/deployment_docs.yml
- 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@v1-node16
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/${DESTINATION_DIR}/html"