generated from MHG-LAB/submit-urls-from-sitemap-to-search-engine
-
Notifications
You must be signed in to change notification settings - Fork 0
47 lines (43 loc) · 1.26 KB
/
push.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
name: push
on:
push:
schedule:
- cron: '0 7 * * *'
watch:
types: [started]
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@master
- name: Set up python
uses: actions/setup-python@v1
with:
python-version: 3.8
- name: Setup Node.js 16.x
uses: actions/setup-node@master
with:
node-version: "16.x"
- name: Npm install
run: npm install
- name: Install requests
run: pip install requests
- name: generate
run: python generate.py
- name: Push to Bing
env:
BING_TOKEN: ${{ secrets.BINGTOKEN }}
run: curl -H "Content-Type:application/json" --data-binary @bing.json "https://ssl.bing.com/webmaster/api.svc/json/SubmitUrlbatch?apikey=${BING_TOKEN}"
- name: Push to Google
env:
GOOGLE_SERVICE_ACCOUNT: ${{ secrets.GOOGLE_SERVICE_ACCOUNT }}
run: |
echo "$GOOGLE_SERVICE_ACCOUNT" > ./service_account.json
node index
- name: Push to BaiDu
env:
BAIDU_TOKEN: ${{ secrets.BAIDUTOKEN }}
SITE: ${{ secrets.SITE }}
run: curl -H 'Content-Type:text/plain' --data-binary @urls.txt "http://data.zz.baidu.com/urls?site=${SITE}&token=${BAIDU_TOKEN}"