9
9
branches :
10
10
- ' docs-testing-jesse'
11
11
tags :
12
- - ' staging-*'
13
- - ' production- *'
12
+ - ' staging-MKDOCS *'
13
+ - ' MKDOCS *'
14
14
15
15
concurrency :
16
- group : ${{ github.workflow }}-${{ github.ref }}
16
+ group : ${{ github.workflow }}-${{ github.event.pull_request.number || github. ref }}-${{ github.ref_name != 'docs-testing-jesse' || github.run_id}}-${{ github.ref_type != 'tag' || github.run_id }}
17
17
cancel-in-progress : true
18
18
19
19
defaults :
20
20
run :
21
21
shell : bash
22
-
22
+
23
23
jobs :
24
- build-and-deploy-flex-manual :
24
+ build-and-deploy-mkdocs-site :
25
+ timeout-minutes : 5
25
26
runs-on : ubuntu-24.04
26
27
permissions :
27
28
id-token : write
@@ -45,19 +46,31 @@ jobs:
45
46
- name : Set DEPLOY_ENV
46
47
id : set-env
47
48
run : |
48
- if [[ "${GITHUB_REF}" == refs/tags/production- * ]]; then
49
+ if [[ "${GITHUB_REF}" == refs/tags/MKDOCS* ]] && [[ "${GITHUB_REF}" != refs/tags/staging-MKDOCS * ]]; then
49
50
echo "DEPLOY_ENV=production" >> $GITHUB_ENV
50
- elif [[ "${GITHUB_REF}" == refs/tags/staging-* ]]; then
51
+ elif [[ "${GITHUB_REF}" == refs/tags/staging-MKDOCS * ]]; then
51
52
echo "DEPLOY_ENV=staging" >> $GITHUB_ENV
52
53
else
53
54
echo "DEPLOY_ENV=sandbox" >> $GITHUB_ENV
54
55
fi
55
56
- name : Sync the project
56
57
working-directory : ./docs
57
58
run : make setup
58
- - name : Build Flex Manual
59
+ - name : Build Docs Site
59
60
working-directory : ./docs
60
- run : make build-flex-manual
61
- - name : Deploy Flex Manual
61
+ run : make build
62
+ - name : Deploy Docs Site
62
63
working-directory : ./docs
63
- run : make deploy-flex-manual ENVIRONMENT=${{ env.DEPLOY_ENV }} BRANCH=${{ env.BRANCH }}
64
+ run : make deploy ENVIRONMENT=${{ env.DEPLOY_ENV }} BRANCH=${{ env.BRANCH }}
65
+ - name : Output URL to Summary
66
+ run : |
67
+ if [[ "${{ env.DEPLOY_ENV }}" == "production" ]]; then
68
+ echo "## Docs site deployed to production" >> $GITHUB_STEP_SUMMARY
69
+ echo "<https://docs.opentrons.com/${{ env.BRANCH }}/>" >> $GITHUB_STEP_SUMMARY
70
+ elif [[ "${{ env.DEPLOY_ENV }}" == "staging" ]]; then
71
+ echo "## Docs site deployed to staging" >> $GITHUB_STEP_SUMMARY
72
+ echo "<https://staging.docs.opentrons.com/${{ env.BRANCH }}/>" >> $GITHUB_STEP_SUMMARY
73
+ else
74
+ echo "## Docs site deployed to sandbox" >> $GITHUB_STEP_SUMMARY
75
+ echo "<http://sandbox.docs.s3-website.us-east-2.amazonaws.com/${{ env.BRANCH }}/>" >> $GITHUB_STEP_SUMMARY
76
+ fi
0 commit comments