55 branches : [publisher-staging, publisher-production]
66
77env :
8- bucket : ' { "staging": "docs.mapbox.com-staging/android /api", "production": "docs.mapbox.com/android /api" }'
8+ bucket : ' { "staging": "docs.mapbox.com-staging/ios /api", "production": "docs.mapbox.com/ios /api" }'
99
1010jobs :
1111 deploy :
@@ -25,35 +25,18 @@ jobs:
2525 - uses : actions/checkout@v4
2626 with :
2727 submodules : recursive
28- - uses : actions/setup-node@v4
29- with :
30- node-version-file : .nvmrc
31- cache : ' npm'
3228
3329 - name : Configure AWS Credentials
3430 uses : mapbox/configure-aws-credentials-internal@v5
3531 with :
3632 target-account-id : ${{ vars.AWS_ACCOUNT_ID_DEFAULT }}
3733
38- - name : Retrieve and configure npm token
39- uses : mapbox/setup-npm-token@v2
40-
41- - name : Install npm dependencies
42- run : npm ci
43-
44- - name : Build for ${{ matrix.environment }}
45- run : npm run build
46- env :
47- # We don't want this to fail on warnings
48- CI : false
49- DEPLOY_ENV : ${{ matrix.environment }}
50-
5134 - name : Sync non-html and json files to ${{ matrix.environment }}
52- run : aws s3 sync build ${{ env.targetBucket }} --exclude "*. html" --exclude "*.json" --cache-control "max-age=31536000"
35+ run : aws s3 sync . ${{ env.targetBucket }} --exclude "*" --include "*.*.*/*" --exclude "*.*.*/*. html" --exclude "*.*.*/ *.json" --cache-control "max-age=31536000"
5336 env :
5437 targetBucket : s3://${{ fromJson(env.bucket)[matrix.environment] }}
5538
5639 - name : Sync html and json files to ${{ matrix.environment }}
57- run : aws s3 sync build ${{ env.targetBucket }} --exclude "*" --include "*.html" --include "*.json" --cache-control "max-age=10,stale-while-revalidate=60"
40+ run : aws s3 sync . ${{ env.targetBucket }} --exclude "*" --include "*.*.*/*. html" --include "*.*.*/ *.json" --cache-control "max-age=10,stale-while-revalidate=60"
5841 env :
5942 targetBucket : s3://${{ fromJson(env.bucket)[matrix.environment] }}
0 commit comments