-
Notifications
You must be signed in to change notification settings - Fork 6
38 lines (33 loc) · 975 Bytes
/
sync2blog.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
name: Sync friends' link to blog
on:
push:
branches:
- master
workflow_dispatch:
jobs:
sync:
runs-on: ubuntu-22.04
steps:
- name: Checkout lab repo
uses: actions/checkout@v3
with:
repository: GrassBlock1/lab-2024
path: ./target
token: ${{ secrets.GH_TOKEN }} # Personal Access Token
- name: Checkout (GrassBlock1/Friend-of-mine)
uses: actions/checkout@v3
with:
repository: GrassBlock1/Friend-of-mine
path: ./src
token: ${{ secrets.GITHUB_TOKEN }}
- name: Copy files to blog repo
run: cp ./src/data/link.yml ./target/data/link.yml
- name: Add, commit and push
uses: EndBug/add-and-commit@v9
with:
cwd: ./target
default_author: github_actions
add: data/link.yml
message: 'chore: sync friend links (pushed by GitHub Actions)'
fetch: true
push: true