Skip to content

Commit 5dba1f5

Browse files
authored
remove duplicate script and fix action (#449)
* add prettier ignore file * format file and update config * update home config * add prettierignore config * 🤖 update auto-deploy action * make script file executable * bump checkout action to version 4 * remove duplicate script and fix action
1 parent 89e6f0b commit 5dba1f5

File tree

2 files changed

+9
-18
lines changed

2 files changed

+9
-18
lines changed

.github/workflows/autodeploy.yml

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ run-name: Run the deploy command
33
on:
44
push:
55
branches: [main]
6+
67
jobs:
78
deployment:
89
runs-on: ubuntu-latest
@@ -17,15 +18,20 @@ jobs:
1718
run: chmod +x extract.sh
1819
- name: Run the script
1920
run: ./extract.sh
20-
- name: Setup Node & deploy
21+
- name: Setup Node
2122
uses: actions/setup-node@v3
2223
with:
2324
node-version: "20"
25+
- name: Install dependencies
26+
run: npm install
27+
- name: Format code
28+
run: npm run format
29+
- name: Configure Git
2430
run: |
25-
npm install
26-
npm run format
2731
git config --global user.name "${{ github.actor }}"
2832
git config --global user.email "${{ github.actor }}@users.noreply.github.com"
33+
- name: Commit and push changes
34+
run: |
2935
git add .
3036
git commit -m "docs: deploy site"
3137
git push

extract.sh

Lines changed: 0 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -11,20 +11,5 @@ echo layout: home >> "$output_file"
1111
echo --- >> "$output_file"
1212
echo "" >> "$output_file"
1313

14-
# Copy portfolio table
15-
grep -P '^\|.*\|$' "$input_file" >> "$output_file"
16-
# Input and output files
17-
input_file="README.md"
18-
output_file="./docs/portfolio.md"
19-
20-
# Clear the output file
21-
> "$output_file"
22-
23-
# set vitepress layout
24-
echo --- >> "$output_file"
25-
echo layout: home >> "$output_file"
26-
echo --- >> "$output_file"
27-
echo "" >> "$output_file"
28-
2914
# Copy portfolio table
3015
grep -P '^\|.*\|$' "$input_file" >> "$output_file"

0 commit comments

Comments
 (0)