Skip to content

Commit

Permalink
Site updated: 2025-02-12 09:30:20
Browse files Browse the repository at this point in the history
  • Loading branch information
JustPureH2O committed Feb 12, 2025
1 parent 58982e4 commit b7ad727
Show file tree
Hide file tree
Showing 277 changed files with 1,147,806 additions and 0 deletions.
54 changes: 54 additions & 0 deletions .github/workflows/hexo-seo-submit.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,54 @@
name: Hexo Seo Submit
on:
schedule:
- cron: 0 4 * * *
push:
branches:
- master

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
push:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@main
- uses: actions/setup-node@main
with:
node-version: latest

- name: check owner
id: check_owner
run: |
OWNER_TYPE=$(jq -r '.repository.owner.type' "$GITHUB_EVENT_PATH")
OWNER_ID=$(jq -r '.repository.owner.id' "$GITHUB_EVENT_PATH")
SENDER_ID=$(jq -r '.sender.id' "$GITHUB_EVENT_PATH")
if [ "$OWNER_TYPE" = "User" ] && [ "$OWNER_ID" -eq "$SENDER_ID" ]; then
echo "is_owner=true" >> $GITHUB_ENV
elif [ "$OWNER_TYPE" = "Organization" ]; then
echo "is_owner=true" >> $GITHUB_ENV
else
echo "is_owner=false" >> $GITHUB_ENV
fi
env:
GITHUB_EVENT_PATH: ${{ github.event_path }}

- run: |
npm init -y
npm install hexo-seo-submit
- name: push search engine bing
if: env.is_owner
continue-on-error: true
run: |
npx hexo-seo-submit bing -k ${{ secrets.bing_apikey }} -f bing.json
- name: push search engine google
if: env.is_owner
continue-on-error: true
run: |
npx hexo-seo-submit google -f google.txt -mail ${{ secrets.google_client_email }} -key "${{ secrets.google_private_key }}"
Loading

0 comments on commit b7ad727

Please sign in to comment.