Skip to content

Commit bd5f764

Browse files
committed
Added dev portal action, moved gif image to assets folder
1 parent d8ce4b6 commit bd5f764

File tree

3 files changed

+63
-1
lines changed

3 files changed

+63
-1
lines changed

.github/workflows/dev-portal.yml

+62
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,62 @@
1+
name: dev-portal
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
8+
jobs:
9+
replicate-file:
10+
runs-on: ubuntu-latest
11+
name: Replicate Readme Files
12+
13+
steps:
14+
- name: Checkout Project A
15+
uses: actions/checkout@v2
16+
with:
17+
path: ./projectA
18+
19+
- name: Checkout Project B
20+
uses: actions/checkout@master
21+
with:
22+
repository: Norigin/dev-portal
23+
token: ${{ secrets.NM_GH_TOKEN }}
24+
path: ./projectB
25+
26+
- name: Move files
27+
run: |
28+
REPO_NAME=`basename "$PWD"`
29+
[ "$README_ASSETS" == "" ] && IMAGES_FOLDER=readme-assets || IMAGES_FOLDER="$README_ASSETS"
30+
echo "Using IMAGES_FOLDER = $IMAGES_FOLDER"
31+
32+
echo "Creating folder /docs/$REPO_NAME/"
33+
mkdir -p ./projectB/docs/$REPO_NAME/
34+
rm -rf ./projectB/docs/$REPO_NAME/*
35+
mkdir -p ./temp
36+
find ./projectA -name '*.md' | cpio -pdm ./temp
37+
mv ./temp/projectA/* ./projectB/docs/$REPO_NAME/
38+
echo "Readme files moved to /docs/$REPO_NAME/"
39+
40+
mkdir -p ./projectB/static/$IMAGES_FOLDER
41+
mkdir -p ./projectA/$IMAGES_FOLDER
42+
if [[ `ls ./projectA/$IMAGES_FOLDER` != "" ]]
43+
then
44+
cp -rf ./projectA/$IMAGES_FOLDER/* ./projectB/static/$IMAGES_FOLDER
45+
echo "Images moved to /static/$IMAGES_FOLDER"
46+
fi
47+
48+
- name: Push Project B
49+
run: |
50+
REPO_NAME=`basename "$PWD"`
51+
cd ./projectB
52+
if [[ -z $(git status -s) ]]
53+
then
54+
echo "Tree is clean. Nothing to commit"
55+
else
56+
git add .
57+
git config user.name github-actions
58+
git config user.email [email protected]
59+
git commit -am "Replicated from $REPO_NAME"
60+
git push
61+
exit
62+
fi

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@ Norigin Spatial Navigation can be used while working with Key Navigation and Rea
1313
This library allows you to navigate across or focus on all navigable components while browsing.
1414
For example: hyperlinks, buttons, menu items or any interactible part of the User Interface according to the spatial location on the screen.
1515

16-
![Example](norigin-spatial-navigation.gif)
16+
![Example](readme-assets/norigin-spatial-navigation/norigin-spatial-navigation.gif)
1717

1818
[Example Source](https://github.com/NoriginMedia/Norigin-Spatial-Navigation/blob/master/src/App.tsx)
1919

0 commit comments

Comments
 (0)