Skip to content

Commit 90e05ae

Browse files
authored
Merge branch 'main' into product-compliance13
2 parents c859bb9 + 3b62950 commit 90e05ae

File tree

41 files changed

+642
-315
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

41 files changed

+642
-315
lines changed

.github/workflows/deploy-production.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -50,18 +50,18 @@ jobs:
5050
id: gatsby-cache-folder
5151
with:
5252
path: .cache
53-
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
53+
key: ${{ runner.os }}-cache-gatsby-${{ github.refname }}
5454
restore-keys: |
55-
${{ runner.os }}-cache-gatsby-
55+
${{ runner.os }}-cache-gatsby-main
5656
5757
- name: Gatsby Public Folder
5858
uses: actions/cache@v4
5959
id: gatsby-public-folder
6060
with:
6161
path: public/
62-
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
62+
key: ${{ runner.os }}-public-gatsby-${{ github.refname }}
6363
restore-keys: |
64-
${{ runner.os }}-public-gatsby-
64+
${{ runner.os }}-public-gatsby-main
6565
6666
- run: npm install
6767
- run: npm run build
@@ -73,8 +73,18 @@ jobs:
7373
aws-region: us-east-1
7474

7575
- name: Sync all cacheable assets
76-
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/
76+
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --exclude="*.pdf" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/
7777

7878
- name: Sync all non-cacheable assets
7979
# Don't cache any HTML or JSON file: they should always be up-to-dates
80-
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/
80+
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --exclude="*.pdf" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/
81+
82+
- name: Sync PDF
83+
run: aws s3 sync --cache-control "public, max-age=86400, must-revalidate" --include "*.pdf" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --exclude="*.css" --exclude="*.html" --exclude="*.json" --exclude="sw.json" --delete public/ s3://${{ secrets.PRODUCTION_BUCKET_NAME }}/
84+
85+
- name: Purge cache on CloudFlare
86+
run: |
87+
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
88+
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}" \
89+
-H "Content-Type: application/json" \
90+
--data '{"prefixes":["${{ vars.DATASHEETS_BASE_URL }}"]}'

.github/workflows/deploy-staging.yml

Lines changed: 16 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -49,18 +49,18 @@ jobs:
4949
id: gatsby-cache-folder
5050
with:
5151
path: .cache
52-
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
52+
key: ${{ runner.os }}-cache-gatsby-${{ github.refname }}
5353
restore-keys: |
54-
${{ runner.os }}-cache-gatsby-
54+
${{ runner.os }}-cache-gatsby-main
5555
5656
- name: Gatsby Public Folder
5757
uses: actions/cache@v4
5858
id: gatsby-public-folder
5959
with:
6060
path: public/
61-
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
61+
key: ${{ runner.os }}-public-gatsby-${{ github.refname }}
6262
restore-keys: |
63-
${{ runner.os }}-public-gatsby-
63+
${{ runner.os }}-public-gatsby-main
6464
6565
- run: npm install
6666
- run: npm run build
@@ -72,8 +72,18 @@ jobs:
7272
aws-region: us-east-1
7373

7474
- name: Sync all cacheable assets
75-
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
75+
run: aws s3 sync --cache-control "public, max-age=31536000, immutable" --include "*.css" --include="*.js" --include="*.gif" --include="*.png" --include="*.svg" --exclude "*.html" --exclude="sw.js" --exclude="*.json" --exclude="*.pdf" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
7676

7777
- name: Sync all non-cacheable assets
7878
# Don't cache any HTML or JSON file: they should always be up-to-dates
79-
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
79+
run: aws s3 sync --cache-control "public, max-age=0, must-revalidate" --include "*.html" --include="sw.js" --include="*.json" --include "*.css" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --exclude="*.pdf" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
80+
81+
- name: Sync PDF
82+
run: aws s3 sync --cache-control "public, max-age=86400, must-revalidate" --include "*.pdf" --exclude="*.js" --exclude="*.gif" --exclude="*.png" --exclude="*.svg" --exclude="*.css" --exclude="*.html" --exclude="*.json" --exclude="sw.json" --delete public/ s3://${{ secrets.STAGING_BUCKET_NAME }}/
83+
84+
- name: Purge cache on CloudFlare
85+
run: |
86+
curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
87+
-H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}" \
88+
-H "Content-Type: application/json" \
89+
--data '{"prefixes":["${{ vars.DATASHEETS_BASE_URL }}"]}'

.github/workflows/preview.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -69,18 +69,18 @@ jobs:
6969
id: gatsby-cache-folder
7070
with:
7171
path: .cache
72-
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
72+
key: ${{ runner.os }}-cache-gatsby-${{ github.refname }}
7373
restore-keys: |
74-
${{ runner.os }}-cache-gatsby-
74+
${{ runner.os }}-cache-gatsby-main
7575
7676
- name: Gatsby Public Folder
7777
uses: actions/cache@v4
7878
id: gatsby-public-folder
7979
with:
8080
path: public/
81-
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
81+
key: ${{ runner.os }}-public-gatsby-${{ github.refname }}
8282
restore-keys: |
83-
${{ runner.os }}-public-gatsby-
83+
${{ runner.os }}-public-gatsby-main
8484
8585
- run: npm install
8686
- run: npm run build
@@ -135,4 +135,4 @@ jobs:
135135
body: |
136136
## Preview Deployment
137137
🚀 Preview this PR: ${{ steps.url_preview.outputs.NETLIFY_PREVIEW_URL }}
138-
📍 Commit SHA: ${{ github.sha }}
138+
📍 Commit SHA: ${{ github.sha }}

.github/workflows/render-datasheets.yaml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ jobs:
1010
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
1111

1212
steps:
13-
- uses: actions/checkout@v3
14-
- uses: actions/setup-node@v3
13+
- uses: actions/checkout@v4
14+
- uses: actions/setup-node@v4
1515
with:
1616
node-version: 18
1717
cache: "npm"
@@ -20,4 +20,5 @@ jobs:
2020
- name: Render
2121
run: |
2222
cd scripts/datasheet-rendering
23-
./render-datasheets.sh
23+
./render-datasheets.sh
24+
continue-on-error: true
1.26 MB
Loading
297 KB
Loading

0 commit comments

Comments
 (0)