Skip to content

Commit 1fa48af

Browse files
committed
fixup! Deploy to docs-content
1 parent d298919 commit 1fa48af

File tree

1 file changed

+38
-38
lines changed

1 file changed

+38
-38
lines changed

.github/workflows/deploy-staging.yml

+38-38
Original file line numberDiff line numberDiff line change
@@ -34,48 +34,48 @@ jobs:
3434
cache: "npm"
3535
cache-dependency-path: "**/package-lock.json"
3636

37-
# - name: Render Datasheets
38-
# run: cd ${GITHUB_WORKSPACE}/scripts/datasheet-rendering;./render-datasheets.sh
39-
#
40-
# - name: Copy Static Files
41-
# run: |
42-
# mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts
43-
# find ./content/hardware -type f -name "*-schematics.pdf" -exec cp {} ./static/resources/schematics/ \;
44-
# find ./content/hardware -type f -name "*-datasheet.pdf" -exec cp {} ./static/resources/datasheets/ \;
45-
# find ./content/hardware -type f -name "*-full-pinout.pdf" -exec cp {} ./static/resources/pinouts/ \;
46-
# find ./content/hardware -type f -name "*-pinout.png" -exec cp {} ./static/resources/pinouts/ \;
47-
# find ./content/hardware -type f -name "*-step.zip" -exec cp {} ./static/resources/models/ \;
48-
#
49-
# - name: Gatsby main cache
50-
# uses: actions/cache@v4
51-
# id: gatsby-cache-folder
52-
# with:
53-
# path: .cache
54-
# key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
55-
# restore-keys: |
56-
# ${{ runner.os }}-cache-gatsby-
57-
#
58-
# - name: Gatsby Public Folder
59-
# uses: actions/cache@v4
60-
# id: gatsby-public-folder
61-
# with:
62-
# path: public/
63-
# key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
64-
# restore-keys: |
65-
# ${{ runner.os }}-public-gatsby-
66-
#
67-
# - run: npm install
68-
# - run: npm run build
37+
- name: Render Datasheets
38+
run: cd ${GITHUB_WORKSPACE}/scripts/datasheet-rendering;./render-datasheets.sh
39+
40+
- name: Copy Static Files
41+
run: |
42+
mkdir -p static/resources/datasheets static/resources/schematics static/resources/pinouts
43+
find ./content/hardware -type f -name "*-schematics.pdf" -exec cp {} ./static/resources/schematics/ \;
44+
find ./content/hardware -type f -name "*-datasheet.pdf" -exec cp {} ./static/resources/datasheets/ \;
45+
find ./content/hardware -type f -name "*-full-pinout.pdf" -exec cp {} ./static/resources/pinouts/ \;
46+
find ./content/hardware -type f -name "*-pinout.png" -exec cp {} ./static/resources/pinouts/ \;
47+
find ./content/hardware -type f -name "*-step.zip" -exec cp {} ./static/resources/models/ \;
48+
49+
- name: Gatsby main cache
50+
uses: actions/cache@v4
51+
id: gatsby-cache-folder
52+
with:
53+
path: .cache
54+
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
55+
restore-keys: |
56+
${{ runner.os }}-cache-gatsby-
57+
58+
- name: Gatsby Public Folder
59+
uses: actions/cache@v4
60+
id: gatsby-public-folder
61+
with:
62+
path: public/
63+
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
64+
restore-keys: |
65+
${{ runner.os }}-public-gatsby-
66+
67+
- run: npm install
68+
- run: npm run build
6969

7070
- name: Configure AWS credentials from Staging account
7171
uses: aws-actions/configure-aws-credentials@v4
7272
with:
7373
role-to-assume: ${{ secrets.STAGING_IAM_ROLE }}
7474
aws-region: us-east-1
7575

76-
# - name: Sync all cacheable assets
77-
# 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 }}/
78-
#
79-
# - name: Sync all non-cacheable assets
80-
# # Don't cache any HTML or JSON file: they should always be up-to-dates
81-
# 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 }}/
76+
- name: Sync all cacheable assets
77+
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 }}/
78+
79+
- name: Sync all non-cacheable assets
80+
# Don't cache any HTML or JSON file: they should always be up-to-dates
81+
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 }}/

0 commit comments

Comments
 (0)