Merge pull request #20 from Guanran928/master #20
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |