Skip to content

Commit 835f8cc

Browse files
Update main.yml
replaced checkout with switch and DE initialize the old themes
1 parent 9553b89 commit 835f8cc

File tree

1 file changed

+10
-9
lines changed

1 file changed

+10
-9
lines changed

.github/workflows/main.yml

Lines changed: 10 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -24,17 +24,17 @@ jobs:
2424
git config user.name "GitHub Actions"
2525
git config user.email "actions@github.com"
2626
git fetch origin posts
27-
git checkout posts
27+
git switch posts
2828
git fetch origin master
29-
git checkout master
30-
git checkout posts
29+
git switch master
30+
git switch posts
3131
mkdir -p ../temp-md-files
3232
mv *.md ../temp-md-files
3333
git add .
3434
git commit -m "posts moved to maaster"
3535
# git push origin posts
3636
37-
git checkout master
37+
git switch master
3838
mv ../temp-md-files/*.md content/Posts
3939
rm -r ../temp-md-files/
4040
git add content/Posts/
@@ -45,14 +45,14 @@ jobs:
4545
git config user.name "GitHub Actions"
4646
git config user.email "actions@github.com"
4747
git fetch origin posts
48-
git checkout posts
48+
git switch posts
4949
5050
find -mindepth 1 ! -path '*/.*' -exec rm -rf {} +
5151
git add .
5252
# git commit -m "cleared"
5353
5454
# git fetch origin posts
55-
# git checkout posts
55+
# git switch posts
5656
# git merge clean --allow-unrelated-histories
5757
# git branch -d clean
5858
git push origin posts
@@ -68,7 +68,8 @@ jobs:
6868
# Step 4: Build the Site
6969
- name: Build Hugo Site
7070
run: |
71-
git checkout master
71+
git switch master
72+
git submodule deinit -f themes/hermit-V2
7273
git submodule update --init --recursive
7374
hugo
7475
git add .
@@ -79,9 +80,9 @@ jobs:
7980
run: |
8081
git config user.name "GitHub Actions"
8182
git config user.email "actions@github.com"
82-
git checkout For-Hosting # Switch to 'For-Hosting' branch
83+
git switch For-Hosting # Switch to 'For-Hosting' branch
8384
git fetch origin master
84-
git checkout master
85+
git switch master
8586
# git add .
8687
# git commit -m "backup the old version"
8788

0 commit comments

Comments
 (0)