-
-
Notifications
You must be signed in to change notification settings - Fork 7.1k
46 lines (40 loc) · 1.39 KB
/
update-site-list.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
name: Update Site List
# Trigger the workflow when changes are pushed to the main branch
# and the changes include the sherlock_project/resources/data.json file
on:
push:
branches:
- master
paths:
- sherlock_project/resources/data.json
jobs:
sync-json-data:
# Use the latest version of Ubuntu as the runner environment
runs-on: ubuntu-latest
steps:
# Check out the code at the specified pull request head commit
- name: Checkout code
uses: actions/checkout@v4
with:
ref: ${{ github.event.pull_request.head.sha }}
fetch-depth: 0
# Install Python 3
- name: Install Python
uses: actions/setup-python@v5
with:
python-version: '3.x'
# Execute the site_list.py Python script
- name: Execute site-list.py
run: python devel/site-list.py
- name: Pushes to another repository
uses: sdushantha/github-action-push-to-another-repository@main
env:
SSH_DEPLOY_KEY: ${{ secrets.SSH_DEPLOY_KEY }}
API_TOKEN_GITHUB: ${{ secrets.API_TOKEN_GITHUB }}
with:
source-directory: 'output'
destination-github-username: 'sherlock-project'
commit-message: 'Updated site list'
destination-repository-name: 'sherlockproject.xyz'
user-email: [email protected]
target-branch: master