File tree Expand file tree Collapse file tree 1 file changed +29
-12
lines changed Expand file tree Collapse file tree 1 file changed +29
-12
lines changed Original file line number Diff line number Diff line change 1
- name : Publish Documentation
1
+ name : Deploy documentation
2
2
3
3
on :
4
+ workflow_dispatch :
5
+ inputs :
6
+ environment :
7
+ description : Environment to deploy to.
8
+ default : docs-dev
9
+ required : true
10
+ type : environment
4
11
push :
12
+ paths :
13
+ # Only trigger on changes to documentation files.
14
+ - ' docs/**'
15
+ - ' mkdocs.yaml'
16
+ - ' .github/workflows/docs.yaml'
17
+ - ' *.md'
5
18
branches :
6
19
- main
20
+ - docs
7
21
8
22
permissions :
9
23
contents : read
10
24
11
25
jobs :
12
26
deploy :
13
- name : Deploy Documentation
14
- environment : ' docs-dev'
27
+ name : Deploy Documentation to ${{ inputs.environment || 'docs-dev'}}
28
+ environment : ${{ inputs.environment || 'docs-dev'}}
15
29
runs-on : ubuntu-latest
16
30
steps :
17
31
- uses : actions/checkout@v4
18
- with :
19
- submodules : true
20
32
- name : Set up AWS credentials
21
33
uses : aws-actions/configure-aws-credentials@v4
22
34
with :
23
35
aws-access-key-id : ${{ secrets.AWS_ACCESS_KEY_ID }}
24
36
aws-secret-access-key : ${{ secrets.AWS_SECRET_ACCESS_KEY }}
25
- aws-region : us-east-1
37
+ aws-region : ${{ env.AWS_REGION || ' us-east-1' }}
26
38
- uses : actions/setup-python@v5
27
39
with :
28
40
python-version : 3.x
35
47
path : .cache
36
48
restore-keys : |
37
49
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' }}"
You can’t perform that action at this time.
0 commit comments