Skip to content

sync_searcher

sync_searcher #122

Workflow file for this run

name: sync_searcher
on:
workflow_dispatch:
workflow_run:
workflows: ["publish_docs"]
types:
- completed
push:
branches:
- master
paths:
- search.html
- browse.html
jobs:
deploy:
if: github.actor == 'samapriya'
runs-on: ubuntu-latest
steps:
- name: Wait for GitHub Pages
run: |
# Wait for 2 minutes to allow GitHub Pages deployment to complete
echo "Waiting for GitHub Pages deployment to complete..."
sleep 120
- name: Checkout repository
uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: actions/setup-python@v4
with:
python-version: "3.10"
- name: Checkout gh-pages branch
uses: actions/checkout@v3
with:
fetch-depth: 0
ref: gh-pages
- name: Download search.html
run: |
curl -o search.html https://raw.githubusercontent.com/samapriya/awesome-gee-community-datasets/refs/heads/master/search.html
- name: Download browse.html
run: |
curl -o browse.html https://raw.githubusercontent.com/samapriya/awesome-gee-community-datasets/refs/heads/master/browse.html
- name: Configure Git
run: |
git config user.name "GitHub Action"
git config user.email "[email protected]"
- name: Commit files to gh-pages
run: |
git add search.html browse.html
git commit -m "Add search.html and browse.html from external source"
- name: Push changes to gh-pages
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
git push origin gh-pages