generated from readthedocs/tutorial-template
-
Notifications
You must be signed in to change notification settings - Fork 38
47 lines (39 loc) · 1.42 KB
/
booklets.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
47
name: "Booklets Builder"
on:
push:
branches:
- main
workflow_dispatch:
jobs:
build-booklets:
runs-on: ubuntu-latest
if: github.repository == 'FIRST-Tech-Challenge/ftcdocs'
permissions:
id-token: write
contents: read
steps:
- name: Checkout Repository
uses: actions/checkout@v3
- name: Refresh Packages
run: sudo apt-fast -y update
- name: Install Dependencies
run: xargs -a dependencies sudo apt-fast install -y
- name: Python Setup
uses: actions/setup-python@v4
with:
python-version: 3.8
cache: 'pip'
- name: Python Install Dependencies
run: pip install -r docs/requirements.txt
- name: Build Booklets
env:
SPHINXOPTS: "-D html_context.commit=${{ github.sha }} -D version=latest -A display_github=true -A github_user=${{ github.repository_owner }} -A github_repo=${{ github.event.repository.name }} -A github_version=${{ github.ref_name }} -A conf_py_path=/docs/source/"
run: make -C docs/ booklets
- name: Configure AWS credentials
uses: aws-actions/configure-aws-credentials@v2
with:
role-to-assume: arn:aws:iam::549273919012:role/gh-actions/ftc-docs-uploader
aws-region: us-west-2
- name: Upload Booklets to S3
run: |
aws s3 sync docs/build/booklets s3://ftc-docs-cdn/booklets/en --delete