Skip to content

Commit 9efc30a

Browse files
committed
Hello world
0 parents  commit 9efc30a

File tree

5,035 files changed

+443290
-0
lines changed

Some content is hidden

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

5,035 files changed

+443290
-0
lines changed

.github/workflows/deploy-stg.yml

+60
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: Deploy to docs.oniudra.cc
2+
3+
on:
4+
workflow_dispatch:
5+
push:
6+
branches:
7+
- main
8+
- ghaction
9+
10+
jobs:
11+
build:
12+
if: "github.repository == 'arduino/docs-content'"
13+
runs-on: ubuntu-latest
14+
env:
15+
REPO_ACCESS_TOKEN: ${{ secrets.REPO_ACCESS_TOKEN }}
16+
APP_ENV: staging
17+
18+
steps:
19+
- uses: actions/checkout@v2
20+
- uses: actions/setup-node@v2
21+
with:
22+
node-version: 14
23+
cache: "npm"
24+
cache-dependency-path: "**/package-lock.json"
25+
26+
- name: Gatsby main cache
27+
uses: actions/cache@v1
28+
id: gatsby-cache-folder
29+
with:
30+
path: .cache
31+
key: ${{ runner.os }}-cache-gatsby-${{ github.sha }}
32+
restore-keys: |
33+
${{ runner.os }}-cache-gatsby-
34+
35+
- name: Gatsby Public Folder
36+
uses: actions/cache@v1
37+
id: gatsby-public-folder
38+
with:
39+
path: public/
40+
key: ${{ runner.os }}-public-gatsby-${{ github.sha }}
41+
restore-keys: |
42+
${{ runner.os }}-public-gatsby-
43+
44+
- run: npm install
45+
46+
- run: npm run build
47+
48+
- name: Configure AWS Credentials
49+
uses: aws-actions/configure-aws-credentials@v1
50+
with:
51+
aws-access-key-id: ${{ secrets.STAG_AWS_ACCESS_KEY_ID }}
52+
aws-secret-access-key: ${{ secrets.STAG_AWS_SECRET_ACCESS_KEY }}
53+
aws-region: us-west-1
54+
55+
- name: Sync all cacheable assets
56+
run:
57+
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.STAG_AWS_S3_BUCKET_NAME }}/
58+
# Don't cache any HTML or JSON file: they should always be up-to-date
59+
- name: Sync all non-cacheable assets
60+
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.STAG_AWS_S3_BUCKET_NAME }}/
+25
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
name: Sync private mirror
2+
on:
3+
push:
4+
branches:
5+
- main
6+
jobs:
7+
repo-sync:
8+
if: "github.repository == 'arduino/docs-content'"
9+
runs-on: ubuntu-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
with:
13+
fetch-depth: "0"
14+
ref: "main"
15+
- name: Install SSH key
16+
uses: shimataro/ssh-key-action@v2
17+
with:
18+
key: ${{ secrets.DOCS_PRIVATE_SSH_KEY }}
19+
known_hosts: unnecessary
20+
- run: |
21+
git remote add mirror [email protected]:arduino/docs-content-private.git
22+
git config --global user.email "sync@docs-content-private"
23+
git config --global user.name "docs-sync"
24+
git checkout main
25+
git push -u mirror main
+39
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Sync pull request from private repository
2+
on:
3+
workflow_dispatch:
4+
5+
jobs:
6+
repo-sync:
7+
if: "github.repository == 'arduino/docs-content-private'"
8+
runs-on: ubuntu-latest
9+
steps:
10+
- uses: actions/checkout@v2
11+
with:
12+
fetch-depth: "0"
13+
14+
- name: Install SSH key
15+
uses: shimataro/ssh-key-action@v2
16+
with:
17+
key: ${{ secrets.DOCS_PRIVATE_SSH_KEY }}
18+
known_hosts: unnecessary
19+
20+
- name: Sync branch
21+
run: |
22+
git remote add mirror [email protected]:arduino/docs-content.git
23+
git config --global user.email "sync@docs-content-private"
24+
git config --global user.name "docs-sync"
25+
git checkout -b sync/${GITHUB_REF_NAME}
26+
git push -u mirror sync/${GITHUB_REF_NAME}
27+
28+
- name: Sync PR
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.SYNC_GITHUB_CLI_TOKEN }}
31+
run: gh pr create --title "$(gh pr view $GITHUB_REF_NAME --json title --jq .title)" --body "$(gh pr view $GITHUB_REF_NAME --json body --jq .body)" --repo arduino/docs-content
32+
33+
- name: Close PR
34+
env:
35+
GITHUB_TOKEN: ${{ secrets.SYNC_GITHUB_CLI_TOKEN }}
36+
run: gh pr close $GITHUB_REF_NAME
37+
38+
- name: Delete branch
39+
run: git push origin :${GITHUB_REF_NAME}

.gitignore

+10
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
.babelrc
2+
.cache
3+
_templates
4+
algolia-queries.js
5+
envs
6+
gatsby-*
7+
node_modules
8+
public
9+
scripts
10+
src

.npmrc

+4
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
@bcmi-labs:registry=https://npm.pkg.github.com/
2+
@serjlee:registry=https://npm.pkg.github.com/
3+
@arduino:registry=https://npm.pkg.github.com/
4+
//npm.pkg.github.com/:_authToken=${REPO_ACCESS_TOKEN}

CONTRIBUTING.md

+35
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
# Contributing to Arduino Documentation
2+
3+
The docs.arduino.cc website is built from the Markdown sources hosted in this repository.
4+
5+
## How to Contribute
6+
7+
In order to contribute new or updated documentation, you must first create a GitHub account and fork the original repository to your own account. You can make changes, save them in your repository, then [make a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork) against this repository. The pull request will appear [in the repository](https://github.com/arduino/docs.arduino.cc/pulls) where it can be assessed by the maintainers, copy edited, and if appropriate, merged.
8+
9+
**NOTE:** Unless you are opening a pull request which will only make small corrections, for instance to correct a typo, you are more likely to get traction for your changes if you [open an issue](https://github.com/arduino/docs.arduino.cc/issues) first to discuss the proposed changes.
10+
11+
**NOTE:** The default [branch](https://github.com/arduino/docs.arduino.cc/branches) of the repository is the `develop` branch, and this should be the branch you get by default when you initially checkout the repository. You should target any pull requests against the `develop` branch, pull requests against the `master` branch will automatically fail checks and not be accepted.
12+
13+
## Type of Content
14+
15+
We welcome contributions from the community, ranging from correcting small typos all the way through to adding entire new sections to the documentation. However, we are looking to keep the contents of this repository focussed on Arduino-specific things.
16+
17+
Contributions that are more likely to be accepted:
18+
19+
* Corrections of typos, broken links, wrong information
20+
* New tutorials showing how to use features of Arduino hardware products
21+
* Improvements to existing articles to clarify unclear concepts or add useful bits of information
22+
23+
Contributions that are more likely to be rejected:
24+
25+
* Generic project tutorials ([Project Hub](https://create.arduino.cc/projecthub) is the place for them)
26+
* Duplicates of existing content
27+
* Content that is specific to third-party services or products
28+
29+
## Style
30+
31+
We require content to be written in plain and concise language, so that both basic and advanced users can understand it. See our [Style Guide](https://www.arduino.cc/en/Reference/StyleGuide) for more information about this.
32+
33+
## Licensing
34+
35+
The documentation is under a [Creative Commons Attribution-Sharealike](https://creativecommons.org/licenses/by-sa/4.0/) (CC BY-SA 4.0) license, while examples of code are licensed under a [public domain](https://creativecommons.org/share-your-work/public-domain/cc0/) license. By contributing content to this repository you are agreeing to place your contributions under these licenses.

README.md

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
# docs-content
2+
3+
Content for docs.arduino.cc
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: 10k Ω resistor
3+
---
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: 220 Ω resistor
3+
---
Loading
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
---
2+
title: 4.7k Ω resistor
3+
---

0 commit comments

Comments
 (0)