46 lines (41 loc) · 1.34 KB
/
docs_release.yaml
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
name: Make Sphinx Docs and Upload to GCS
on:
workflow_dispatch:
inputs:
libVersion:
description: Library Version
required: true
default: x.x.x
jobs:
build:
runs-on: ubuntu-latest
permissions:
contents: 'read'
id-token: 'write'
steps:
- uses: actions/checkout@master
- name: Set up Python 3.9
uses: actions/setup-python@v1
with:
python-version: 3.9
- name: Setup Gcloud SDK
uses: google-github-actions/setup-gcloud@v0
with:
version: '340.0.0' # This version isn't special, just setting it to make builds stable
service_account_email: ${{ secrets.GCP_SA_EMAIL }}
service_account_key: ${{ secrets.GCP_SA_KEY }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
if [ -f requirements.txt ]; then pip install -r requirements.txt; fi
- name: Build & Zip Sphinx HTML Docs
run: |
cd docs/
make clean html
cd _build/html
tar -czvf ../../${{ github.event.inputs.libVersion }}.tar.gz .
- id: "gcs-upload"
uses: 'google-github-actions/upload-cloud-storage@v0'
with:
path: 'docs/${{ github.event.inputs.libVersion }}.tar.gz'
destination: 'ua-web-ci-prod-docs-transfer/libraries/python/${{ github.event.inputs.libVersion }}.tar.gz'