-
Notifications
You must be signed in to change notification settings - Fork 0
37 lines (30 loc) · 960 Bytes
/
mergeFiles.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
name: Merge MD Files
on:
push:
branches:
- master # adjust the branch as needed
permissions:
contents: write
jobs:
merge_md_files:
runs-on: ubuntu-latest
steps:
- name: Checkout Repository
uses: actions/checkout@v2
- name: Merge MD Files
run: |
# Define the order of markdown files to merge
files_to_merge=("/index.md", "/ssh.md")
# Merge files in the specified order
for file in "${files_to_merge[@]}"; do
cat "$file" >> README.md
echo "" >> README.md # Add a newline between files
done
- name: Commit and Push Changes
run: |
git config --global user.email "actions@github.com"
git config --global user.name "GitHub Actions"
git add README.md
git commit -m "Merge markdown files"
git push
git push -u https://pyloris:${{ secrets.GITHUB_TOKEN }}@github.com/Pyloris/linuxKing.git master