diff --git a/.github/index.html b/.github/index.html new file mode 100644 index 0000000..201c0d0 --- /dev/null +++ b/.github/index.html @@ -0,0 +1,59 @@ + + + + + My Photohub + + + + + + + diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml new file mode 100644 index 0000000..7b01926 --- /dev/null +++ b/.github/workflows/publish.yml @@ -0,0 +1,29 @@ +name: Copy folder to other branch + +on: + push: + branches: + - issue#5-gen-web + +jobs: + copy: + name: Copy my folder + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - name: copy + env: + SRC_FOLDER_PATH: 'optimized' + TARGET_BRANCH: 'gh-pages' + run: | + files=$(find $SRC_FOLDER_PATH -type f) # get the file list + git config --global user.name 'GitHub Action' + git config --global user.email 'action@github.com' + git pull # fetch branches + git checkout $TARGET_BRANCH # checkout to your branch + git checkout ${GITHUB_REF##*/} -- $files # copy files from the source branch + ls -1 $SRC_FOLDER_PATH > filelist.txt # put filelist to root + test -e index.html || git show issue#5-gen-web:.github/index.html > index.html # copy index file + git add -A # Add all files + git diff-index --quiet HEAD || git commit -am "Optimized Files Updated" # commit to the repository (ignore if no mod) + git push origin $TARGET_BRANCH # push to remote branch \ No newline at end of file diff --git a/optimized/jpegTest.jpeg b/optimized/jpegTest.jpeg new file mode 100644 index 0000000..461f173 Binary files /dev/null and b/optimized/jpegTest.jpeg differ diff --git a/optimized/jpegTest2.png b/optimized/jpegTest2.png new file mode 100644 index 0000000..6909c14 Binary files /dev/null and b/optimized/jpegTest2.png differ diff --git a/optimized/pngTest.png b/optimized/pngTest.png new file mode 100644 index 0000000..e210d32 Binary files /dev/null and b/optimized/pngTest.png differ diff --git a/optimized/pngTest2.png b/optimized/pngTest2.png new file mode 100644 index 0000000..10cfa14 Binary files /dev/null and b/optimized/pngTest2.png differ