-
Notifications
You must be signed in to change notification settings - Fork 11
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
692 changed files
with
82,941 additions
and
50,860 deletions.
There are no files selected for viewing
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,26 +5,120 @@ on: | |
branches: [master, beta] | ||
|
||
jobs: | ||
get_tags: | ||
runs-on: ubuntu-latest | ||
outputs: | ||
matrix: ${{ steps.set-matrix.outputs.matrix }} | ||
steps: | ||
- name: Get list of releases 📋 | ||
uses: octokit/[email protected] | ||
id: get_latest_release | ||
with: | ||
route: GET /repos/kherp/react-components/tags | ||
owner: octokit | ||
repo: request-action | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Convert list of releases to json and filter out versions less than minimum version 📝 | ||
id: set-matrix | ||
run: | | ||
arr=( $(echo $data | jq -r '.[].name') ) | ||
major="" | ||
JSON="{\"include\":[" | ||
for i in "${arr[@]}" | ||
do | ||
if [ "$(printf '%s\n' "$minver" "$i" | sort -V | head -n1)" = "$minver" ]; then | ||
if [ "$major" != "$(echo $i | cut -d. -f1)" ]; then | ||
major=`echo $i | cut -d. -f1` | ||
JSON="$JSON$(printf '{"name": "%s"}, ' "${i}")" | ||
fi | ||
fi | ||
done | ||
JSON="${JSON%,*} ${JSON##*,}" | ||
JSON="$JSON]}" | ||
echo "test: $JSON" | ||
echo "::set-output name=matrix::$JSON" | ||
env: | ||
data: ${{steps.get_latest_release.outputs.data}} | ||
minver: v4.0.0 | ||
gh_pages: | ||
needs: get_tags | ||
runs-on: ubuntu-latest | ||
|
||
outputs: | ||
matrix: ${{ needs.get_tags.outputs.matrix }} | ||
path: ${{ steps.get_version_list.outputs.path }} | ||
file: ${{ steps.get_version_list.outputs.file }} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Setup Node | ||
- name: Setup Node 🏗️ | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
node-version: 15.x | ||
|
||
- name: Installing dependencies | ||
- name: Installing dependencies ⏳ | ||
run: npm ci | ||
|
||
- name: Building docs | ||
- name: Generating versions list | ||
id: get_version_list | ||
run: | | ||
echo "$data" > $jsonPath$jsonFileName | ||
echo "::set-output name=path::$jsonPath" | ||
echo "::set-output name=file::$jsonFileName" | ||
env: | ||
data: ${{needs.get_tags.outputs.matrix}} | ||
jsonPath: ./docs/src/assets/jsons/ | ||
jsonFileName: versions.json | ||
- name: Building docs 🔨 | ||
run: npm run build:docs | ||
|
||
- name: Publish | ||
- name: Publish 🚀 | ||
uses: crazy-max/[email protected] | ||
with: | ||
build_dir: docs/public | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }} | ||
build_docs: | ||
needs: gh_pages | ||
runs-on: ubuntu-latest | ||
strategy: | ||
max-parallel: 1 | ||
matrix: ${{fromJson(needs.gh_pages.outputs.matrix)}} | ||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
ref: ${{ matrix.name }} | ||
- name: Setup Node 🏗️ | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 15.x | ||
- name: Installing dependencies ⏳ | ||
run: npm ci | ||
- name: Building docs 🔨 | ||
id: get_doc_folder | ||
run: | | ||
if [ "$(printf '%s\n' "$requiredver" "$currentver" | sort -V | head -n1)" = "$requiredver" ]; then | ||
echo "base=\"/react-components/${currentver}\"" >> .env | ||
mkdir -p $jsonPath && touch $jsonPath$jsonFile | ||
echo "$data" > $jsonPath$jsonFile | ||
npm run build:docs | ||
echo "::set-output name=doc_folder::docs/public" | ||
else | ||
npm run docs | ||
echo "::set-output name=doc_folder::docs" | ||
fi | ||
env: | ||
requiredver: v5.0.0 # oldest version where gatsby is implemented | ||
data: ${{needs.gh_pages.outputs.matrix}} | ||
jsonPath: ${{ needs.gh_pages.outputs.path }} | ||
jsonFile: ${{ needs.gh_pages.outputs.file }} | ||
currentver: ${{ matrix.name }} | ||
- name: Deploy 🚀 | ||
uses: JamesIves/[email protected] | ||
with: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
BRANCH: gh-pages # The branch the action should deploy to. | ||
FOLDER: ${{steps.get_doc_folder.outputs.doc_folder}} # The folder the action should deploy. | ||
TARGET_FOLDER: ${{ matrix.name }} | ||
CLEAN: true # Automatically remove deleted files from the deploy branch | ||
CLEAN_EXCLUDE: '["version"]' | ||
|
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -14,7 +14,7 @@ jobs: | |
- name: Setup node | ||
uses: actions/setup-node@v2 | ||
with: | ||
node-version: 14.x | ||
node-version: 15.x | ||
|
||
- name: Installing dependencies | ||
run: npm ci | ||
|
@@ -40,5 +40,7 @@ jobs: | |
uses: coverallsapp/[email protected] | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
path-to-lcov: ./lib/coverage/lcov.info | ||
env: | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | ||
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,16 @@ | ||
# Files | ||
*.md | ||
*.yml | ||
__mocks__ | ||
coverage | ||
node_modules | ||
dist | ||
.github | ||
.vscode | ||
package.json | ||
package-lock.json | ||
package-lock.json | ||
|
||
# Directories | ||
.github/ | ||
.vscode/ | ||
test/ | ||
coverage/ | ||
node_modules/ | ||
dist/ | ||
docs/public/ | ||
docs/static/ | ||
|
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Empty file.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.