Skip to content

sync with GEEx

sync with GEEx #241

Workflow file for this run

name: sync with GEEx
on:
push:
branches: [ master ]
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
buildAndMirrror:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: grant access
env:
GIT_COOKIE_VALUE: ${{ secrets.GIT_COOKIE_VALUE }}
run: |
touch ~/.gitcookies
chmod 0600 ~/.gitcookies
echo earthengine.googlesource.com,FALSE,/,TRUE,2147483647,o,${GIT_COOKIE_VALUE} | tr , \\t >>~/.gitcookies
- name: config git
run: |
git config http.cookiefile ~/.gitcookies
git config http.postBuffer 157286400
git config user.email "githubActionAutoMerge@no-one.com"
git config user.name "githubActionAutoMerge"
git config pull.rebase false
- name: load Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- run: pip install jsmin
- name: create openEEL
env:
GEE_REPO_ADDRESS: ${{secrets.GEE_REPO_ADDRESS}}
run: |
python genearteOpenEEL.py
git add loadAll
git add loadAll4py
git add loadAllSF
git commit -m 'update loadAll'
git push
- name: mirror the git
env:
GEE_REPO_ADDRESS: ${{secrets.GEE_REPO_ADDRESS}}
run: |
git pull https://earthengine.googlesource.com/${GEE_REPO_ADDRESS} master --allow-unrelated-histories || bash -c "git checkout --ours . ; git add -u ; git commit -m 'autoMerge'"
git push https://earthengine.googlesource.com/${GEE_REPO_ADDRESS} master
git push
doc:
needs: buildAndMirrror
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
with:
fetch-depth: 0
- name: load Python
uses: actions/setup-python@v2
with:
python-version: '3.8'
architecture: 'x64'
- name: generate node file
run: |
git checkout origin/gh-pages -- genearteOpenEEL_doc.py
git checkout origin/gh-pages -- ee.js
python3 genearteOpenEEL_doc.py
- name: load node
uses: actions/setup-node@v2
with:
node-version: 15.x
- name: create docJson
run: |
node -e " var fs = require('fs'); eval(fs.readFileSync('./openEEL_doc').toString())"
git stash --include-untracked
git checkout gh-pages
rm -f doc.json openEEL_doc
git stash apply
git add doc.json
git config user.email "githubActionAutoDoc@no-one.com"
git config user.name "githubActionAutoDoc"
git commit -m 'docAutoUpdate'
git push