Skip to content

Commit 9820757

Browse files
authored
Merge branch 'main' into benjamindannegard/cloud-editor-naming-fix
2 parents cbbe079 + 3366646 commit 9820757

File tree

211 files changed

+5896
-1129
lines changed

Some content is hidden

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

211 files changed

+5896
-1129
lines changed

.github/workflows/deploy-production.yml

+25-5
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ jobs:
2626
steps:
2727
- uses: actions/checkout@v4
2828
with:
29-
fetch-depth: 0
29+
fetch-depth: 1
3030
- uses: actions/setup-node@v4
3131
with:
3232
node-version: 18
@@ -50,28 +50,48 @@ 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.ref_name }}
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.ref_name }}
6363
restore-keys: |
64-
${{ runner.os }}-public-gatsby-
64+
${{ runner.os }}-public-gatsby-main
6565
6666
- run: npm install
6767
- run: npm run build
6868

69+
- name: Clean up node_modules
70+
run: rm -rf node_modules
71+
6972
- name: Configure AWS credentials from Production account
7073
uses: aws-actions/configure-aws-credentials@v4
7174
with:
7275
role-to-assume: ${{ secrets.PRODUCTION_IAM_ROLE }}
7376
aws-region: us-east-1
7477

78+
- name: Sync all cacheable assets
79+
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 }}/
80+
81+
- name: Sync all non-cacheable assets
82+
# Don't cache any HTML or JSON file: they should always be up-to-dates
83+
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 }}/
84+
85+
# - name: Sync PDF
86+
# 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 }}/
87+
88+
# - name: Purge cache on CloudFlare
89+
# run: |
90+
# curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
91+
# -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}" \
92+
# -H "Content-Type: application/json" \
93+
# --data '{"prefixes":["${{ vars.DATASHEETS_BASE_URL }}"]}'
94+
7595
- name: Sync all cacheable assets
7696
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 }}/
7797

.github/workflows/deploy-staging.yml

+26-6
Original file line numberDiff line numberDiff line change
@@ -25,8 +25,7 @@ jobs:
2525
steps:
2626
- uses: actions/checkout@v4
2727
with:
28-
fetch-depth: 0
29-
- run: git log -1 --pretty=format:%aI content/learn/04.electronics/05.servo-motors/servo-motors.md
28+
fetch-depth: 1
3029
- uses: actions/setup-node@v4
3130
with:
3231
node-version: 18
@@ -50,31 +49,52 @@ jobs:
5049
id: gatsby-cache-folder
5150
with:
5251
path: .cache
53-
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
52+
key: ${{ runner.os }}-cache-gatsby-${{ github.ref_name }}
5453
restore-keys: |
55-
${{ runner.os }}-cache-gatsby-
54+
${{ runner.os }}-cache-gatsby-main
5655
5756
- name: Gatsby Public Folder
5857
uses: actions/cache@v4
5958
id: gatsby-public-folder
6059
with:
6160
path: public/
62-
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
61+
key: ${{ runner.os }}-public-gatsby-${{ github.ref_name }}
6362
restore-keys: |
64-
${{ runner.os }}-public-gatsby-
63+
${{ runner.os }}-public-gatsby-main
6564
6665
- run: npm install
6766
- run: npm run build
6867

68+
- name: Clean up node_modules
69+
run: rm -rf node_modules
70+
6971
- name: Configure AWS credentials from Staging account
7072
uses: aws-actions/configure-aws-credentials@v4
7173
with:
7274
role-to-assume: ${{ secrets.STAGING_IAM_ROLE }}
7375
aws-region: us-east-1
7476

77+
# - name: Sync all cacheable assets
78+
# 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 }}/
79+
80+
# - name: Sync all non-cacheable assets
81+
# # Don't cache any HTML or JSON file: they should always be up-to-dates
82+
# 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 }}/
83+
84+
# - name: Sync PDF
85+
# 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 }}/
86+
87+
# - name: Purge cache on CloudFlare
88+
# run: |
89+
# curl -X POST "https://api.cloudflare.com/client/v4/zones/${{ secrets.CLOUDFLARE_ZONE }}/purge_cache" \
90+
# -H "Authorization: Bearer ${{ secrets.CLOUDFLARE_PURGE_API_TOKEN }}" \
91+
# -H "Content-Type: application/json" \
92+
# --data '{"prefixes":["${{ vars.DATASHEETS_BASE_URL }}"]}'
93+
7594
- name: Sync all cacheable assets
7695
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 }}/
7796

7897
- name: Sync all non-cacheable assets
7998
# Don't cache any HTML or JSON file: they should always be up-to-dates
8099
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 }}/
100+

.github/workflows/preview.yml

+5-5
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.ref_name }}
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.ref_name }}
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

+4-3
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

content/_dev-test/product.md

+13
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,13 @@
1+
---
2+
title: Test
3+
url_shop: /test/
4+
url_guide: /test/
5+
primary_button_url: /test/
6+
primary_button_title: Test
7+
secondary_button_url: /test/
8+
secondary_button_title: Test
9+
core: ""
10+
certifications: []
11+
sku: []
12+
essentials_title: "test"
13+
---
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.
Binary file not shown.

content/arduino-cloud/01.guides/01.cloud-editor/getting-started-cloud-editor.md

-91
This file was deleted.
Loading

content/arduino-cloud/01.guides/01.editor/editor.md

+4-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
---
2-
title: 'Cloud Editor (New)'
2+
title: 'Cloud Editor'
33
description: 'Get started with the Cloud Editor, an online IDE in the Arduino Cloud.'
44
author: 'Karl Söderby'
55
---
@@ -26,6 +26,9 @@ The Cloud Editor features all the necessary tools to develop and test your Ardui
2626

2727
1. First, log in or create an [Arduino account](https://app.arduino.cc/).
2828
2. Then install the [Cloud Agent](https://create.arduino.cc/getting-started/plugin/welcome).
29+
30+
![Cloud Agent Installation](./assets/agentinstallation.png)
31+
2932
3. After installing the Cloud Agent, navigate to the [Cloud Editor](https://app.arduino.cc/sketches/).
3033
4. Now connect an Arduino board to your computer. Once you connect it, it should show up in the editor.
3134

Loading

content/arduino-cloud/03.cloud-interface/03.dashboard-widgets/dashboard-widgets.md

+6
Original file line numberDiff line numberDiff line change
@@ -446,3 +446,9 @@ if(valueDropDown == "string"){
446446
//if string matches, execute code
447447
}
448448
```
449+
450+
### Image
451+
452+
![Image widget](assets/widget-image.png)
453+
454+
Use the image widget to put a JPG, PNG or WEBP image on your dashboard! If you instead want to use an image URL, then chose the URL option under image source. Keep in mind the URL needs to be a HTTPS URL and not a HTTP URL. It is also possible to use local addresses. If you are using the URL option you can add a refresh frequency to the image widget, enabling the widget to function as a video or moving image. The image will then update The image can be made to fill the widget frame or to fit within the widget frame. A grey background can be added to the widget to help with visibility issues for PNGs with transparent backgrounds.
Loading

0 commit comments

Comments
 (0)