Skip to content

Commit 7128e87

Browse files
author
mbarber
committed
Merge branch 'dev/docs' of https://github.com/OpenProteinAI/openprotein-python into release
2 parents 6da7ef2 + 58ae66d commit 7128e87

File tree

140 files changed

+20881
-336
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

140 files changed

+20881
-336
lines changed

.github/workflows/s3.yaml

Lines changed: 74 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,74 @@
1+
name: Sphinx Build and Sync to S3
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- prod
8+
9+
jobs:
10+
build_and_sync:
11+
runs-on: ubuntu-latest
12+
steps:
13+
- uses: actions/checkout@v1
14+
15+
- name: Set up Python
16+
uses: actions/setup-python@v2
17+
with:
18+
python-version: '3.x'
19+
20+
- name: Install Sphinx
21+
run: |
22+
python -m pip install --upgrade pip
23+
pip install sphinx
24+
25+
- name: Build HTML with Sphinx
26+
run: |
27+
cd apidocs
28+
make html
29+
30+
- name: Get bucket name
31+
shell: bash
32+
run: |
33+
branch=$(echo ${GITHUB_REF#refs/heads/}); \
34+
if [ $branch == 'develop' ]; \
35+
then bucket=openprotein-docs-dev; \
36+
elif [ $branch == 'prod' ]; \
37+
then bucket=openprotein-docs-prod; \
38+
else exit 1; fi; \
39+
echo $bucket; \
40+
echo "bucket=$bucket" >> $GITHUB_OUTPUT
41+
id: bucket_name
42+
43+
- name: Get distribution ID
44+
shell: bash
45+
run: |
46+
branch=$(echo ${GITHUB_REF#refs/heads/}); \
47+
if [ $branch == 'develop' ]; \
48+
then dist=E3SMW2DYY71HHW; \
49+
elif [ $branch == 'prod' ]; \
50+
then dist=E1CUT1CP31D5NK; \
51+
else exit 1; fi; \
52+
echo $dist; \
53+
echo "dist=$dist" >> $GITHUB_OUTPUT
54+
id: dist_id
55+
56+
- name: Configure AWS credentials
57+
uses: aws-actions/configure-aws-credentials@v1
58+
with:
59+
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
60+
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
61+
aws-region: us-east-1
62+
63+
- name: Sync apidocs to S3
64+
env:
65+
AWS_S3_BUCKET: ${{ steps.bucket_name.outputs.bucket }}
66+
shell: bash
67+
run: |
68+
aws s3 sync apidocs/_build/html s3://${AWS_S3_BUCKET}/apidocs/
69+
70+
- name: Invalidate CloudFront cache
71+
env:
72+
DISTRIBUTION_ID: ${{ steps.dist_id.outputs.dist }}
73+
run: |
74+
aws cloudfront create-invalidation --distribution-id ${DISTRIBUTION_ID} --paths "/apidocs/*"

.gitignore

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ __pycache__/
1717

1818
# Distribution / packaging
1919
.Python
20-
build/
20+
#build/
2121
develop-eggs/
2222
dist/
2323
downloads/
@@ -136,3 +136,5 @@ dmypy.json
136136

137137
# Pyre type checker
138138
.pyre/
139+
140+
/.quarto/

apidocs/Makefile

Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
# Minimal makefile for Sphinx documentation
2+
#
3+
4+
# You can set these variables from the command line, and also
5+
# from the environment for the first two.
6+
SPHINXOPTS ?=
7+
SPHINXBUILD ?= sphinx-build
8+
SOURCEDIR = source
9+
BUILDDIR = build
10+
11+
# Put it first so that "make" without argument is like "make help".
12+
help:
13+
@$(SPHINXBUILD) -M help "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
14+
15+
.PHONY: help Makefile
16+
17+
# Catch-all target: route all unknown targets to Sphinx using the new
18+
# "make mode" option. $(O) is meant as a shortcut for $(SPHINXOPTS).
19+
%: Makefile
20+
@$(SPHINXBUILD) -M $@ "$(SOURCEDIR)" "$(BUILDDIR)" $(SPHINXOPTS) $(O)
27.8 KB
Binary file not shown.
10.8 KB
Binary file not shown.
48.6 KB
Binary file not shown.
159 KB
Binary file not shown.
78.5 KB
Binary file not shown.
101 KB
Binary file not shown.
37.2 KB
Binary file not shown.

0 commit comments

Comments
 (0)