File tree Expand file tree Collapse file tree 2 files changed +87
-0
lines changed Expand file tree Collapse file tree 2 files changed +87
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Build the Docs
2+ on :
3+ push :
4+ branches :
5+ - develop
6+ - master
7+ jobs :
8+ deploy :
9+ runs-on : ubuntu-latest
10+ env :
11+ S3_DIR : genai
12+
13+ steps :
14+ - uses : actions/checkout@v4
15+
16+ - run : ./containthedocs-build.sh
17+
18+ - name : Configure AWS credentials
19+ uses : aws-actions/configure-aws-credentials@v4
20+ with :
21+ aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
22+ aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
23+ aws-region : us-east-1
24+
25+ - name : Copy files to s3 (Staging Clouddocs)
26+ if :
27+ github.ref == 'refs/heads/develop'
28+ run : |
29+ aws s3 sync --delete $PWD/docs/_build/html/ s3://clouddocs.f5networks.net/training/community/$S3_DIR/html/
30+
31+ - name : Copy files to s3 (Production Clouddocs)
32+ if :
33+ github.ref == 'refs/heads/main'
34+ run : |
35+ aws s3 sync --delete $PWD/docs/_build/html/ s3://clouddocs.f5.com/training/community/$S3_DIR/html/
36+ aws cloudfront create-invalidation --distribution-id ${{ secrets.AWS_DIST_ID }} --paths /training/community/$S3_DIR
Original file line number Diff line number Diff line change 1+ name : Check the Docs
2+ on :
3+ pull_request : {}
4+ push :
5+ branches :
6+ - develop
7+ - master
8+ workflow_dispatch : {}
9+
10+ jobs :
11+ grammer :
12+ name : Check Grammer
13+ runs-on : ubuntu-latest
14+ steps :
15+ - uses : actions/checkout@v3
16+
17+ - name : Log the node version
18+ run : |
19+ node -v
20+ - name : Install write-good
21+ run : |
22+ npm install --no-fund --location=global write-good
23+ - name : Run write-good to check grammer
24+ run : |
25+ write-good `find ./docs -name '*.rst'` --so
26+
27+ spelling :
28+ name : Check Spelling
29+ runs-on : ubuntu-latest
30+
31+ steps :
32+ - uses : actions/checkout@v3
33+ - name : Set up Python
34+ uses : actions/setup-python@v4
35+ with :
36+ python-version : ' 3.9'
37+ cache : ' pip'
38+ - name : Install dependencies
39+ run : |
40+ sudo apt update && sudo apt install -y enchant
41+ pip install -r requirements.txt
42+ pip install sphinxcontrib-spelling
43+ - name : Run spell checker
44+ run : |
45+ sphinx-build -b spelling -d docs/_build docs/ docs/_build/spelling
46+ if [[ -s "docs/_build/spelling/index.spelling" ]]; then cat "docs/_build/spelling/index.spelling"; fi
47+ - name : Spelling errors fail the build
48+ # fail the build in case of any misspelled words
49+ run : |
50+ if [[ -s "docs/_build/spelling/index.spelling" ]]; then cat "docs/_build/spelling/index.spelling"; fi
51+ if [[ -s "docs/_build/spelling/index.spelling" ]]; then false; fi
You can’t perform that action at this time.
0 commit comments