-
-
Notifications
You must be signed in to change notification settings - Fork 134
60 lines (54 loc) · 1.65 KB
/
search_sync.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
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 "action@github.com"
- 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