Skip to content

Commit a4bf6b9

Browse files
committed
ci: Updated documentation deploy workflow to deploy to the new bucket.
1 parent b3e41f9 commit a4bf6b9

File tree

1 file changed

+29
-12
lines changed

1 file changed

+29
-12
lines changed

.github/workflows/docs.yaml

Lines changed: 29 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,28 +1,40 @@
1-
name: Publish Documentation
1+
name: Deploy documentation
22

33
on:
4+
workflow_dispatch:
5+
inputs:
6+
environment:
7+
description: Environment to deploy to.
8+
default: docs-dev
9+
required: true
10+
type: environment
411
push:
12+
paths:
13+
# Only trigger on changes to documentation files.
14+
- 'docs/**'
15+
- 'mkdocs.yaml'
16+
- '.github/workflows/docs.yaml'
17+
- '*.md'
518
branches:
619
- main
20+
- docs
721

822
permissions:
923
contents: read
1024

1125
jobs:
1226
deploy:
13-
name: Deploy Documentation
14-
environment: 'docs-dev'
27+
name: Deploy Documentation to ${{ inputs.environment || 'docs-dev'}}
28+
environment: ${{ inputs.environment || 'docs-dev'}}
1529
runs-on: ubuntu-latest
1630
steps:
1731
- uses: actions/checkout@v4
18-
with:
19-
submodules: true
2032
- name: Set up AWS credentials
2133
uses: aws-actions/configure-aws-credentials@v4
2234
with:
2335
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY_ID }}
2436
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
25-
aws-region: us-east-1
37+
aws-region: ${{ env.AWS_REGION || 'us-east-1' }}
2638
- uses: actions/setup-python@v5
2739
with:
2840
python-version: 3.x
@@ -35,9 +47,14 @@ jobs:
3547
path: .cache
3648
restore-keys: |
3749
mkdocs-material-
38-
- name: Install pip dependencies
39-
run: pip install markdown-callouts mkdocs-material pymdown-extensions plantuml_markdown
40-
- name: Build documentation
41-
run: mkdocs build
42-
- name: Push docs to S3
43-
run: aws s3 sync ./site "s3://${{ env.BUCKET_NAME || 'dev.docs.cfa.codes' }}/${{ env.PREFIX || 'cmr-entity-resolution' }}"
50+
- name: Install python dependencies
51+
run: |
52+
pip install \
53+
mkdocs-material \
54+
markdown-callouts \
55+
mdx_truly_sane_lists \
56+
mkdocs-nav-weight \
57+
plantuml_markdown \
58+
pymdown-extensions
59+
- run: mkdocs build
60+
- run: aws s3 sync ./site "s3://${{ env.DOCS_BUCKET || 'docs.dev.services.cfa.codes' }}/${{ env.PREFIX || 'cmr-entity-resolution' }}"

0 commit comments

Comments
 (0)