Skip to content

Commit f7a748b

Browse files
committed
fix: Improve if syntax
1 parent 90e01d5 commit f7a748b

File tree

2 files changed

+14
-14
lines changed

2 files changed

+14
-14
lines changed

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ jobs:
8181
run: npm run build
8282

8383
- name: Remove lint-staged husky
84-
if: github.ref == 'refs/heads/main'
84+
if: ${{ github.ref == 'refs/heads/main' }}
8585
run: |
8686
npm uninstall lint-staged husky
8787
git checkout package-lock.json package.json
8888
8989
- name: Setup mdBook
90-
if: github.ref == 'refs/heads/main'
90+
if: ${{ github.ref == 'refs/heads/main' }}
9191
uses: peaceiris/[email protected]
9292
with:
9393
mdbook-version: '0.4.5'
9494

9595
- name: Build site
96-
if: github.ref == 'refs/heads/main'
96+
if: ${{ github.ref == 'refs/heads/main' }}
9797
working-directory: ./test_projects/mdbook
9898
run: mdbook build
9999

README.md

Lines changed: 11 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -162,7 +162,7 @@ jobs:
162162
163163
- name: Deploy
164164
uses: peaceiris/actions-gh-pages@v3
165-
if: github.ref == 'refs/heads/main'
165+
if: ${{ github.ref == 'refs/heads/main' }}
166166
with:
167167
github_token: ${{ secrets.GITHUB_TOKEN }}
168168
publish_dir: ./public
@@ -672,7 +672,7 @@ jobs:
672672
673673
- name: Deploy
674674
uses: peaceiris/actions-gh-pages@v3
675-
if: github.ref == 'refs/heads/main'
675+
if: ${{ github.ref == 'refs/heads/main' }}
676676
with:
677677
github_token: ${{ secrets.GITHUB_TOKEN }}
678678
publish_dir: ./public
@@ -722,7 +722,7 @@ jobs:
722722
723723
- name: Deploy
724724
uses: peaceiris/actions-gh-pages@v3
725-
if: github.ref == 'refs/heads/main'
725+
if: ${{ github.ref == 'refs/heads/main' }}
726726
with:
727727
github_token: ${{ secrets.GITHUB_TOKEN }}
728728
publish_dir: ./public
@@ -777,7 +777,7 @@ jobs:
777777
778778
- name: Deploy
779779
uses: peaceiris/actions-gh-pages@v3
780-
if: github.ref == 'refs/heads/main'
780+
if: ${{ github.ref == 'refs/heads/main' }}
781781
with:
782782
github_token: ${{ secrets.GITHUB_TOKEN }}
783783
publish_dir: ./out
@@ -828,7 +828,7 @@ jobs:
828828
829829
- name: deploy
830830
uses: peaceiris/actions-gh-pages@v3
831-
if: github.ref == 'refs/heads/main'
831+
if: ${{ github.ref == 'refs/heads/main' }}
832832
with:
833833
github_token: ${{ secrets.GITHUB_TOKEN }}
834834
publish_dir: ./dist
@@ -887,7 +887,7 @@ jobs:
887887
888888
- name: Deploy
889889
uses: peaceiris/actions-gh-pages@v3
890-
if: github.ref == 'refs/heads/main'
890+
if: ${{ github.ref == 'refs/heads/main' }}
891891
with:
892892
github_token: ${{ secrets.GITHUB_TOKEN }}
893893
publish_dir: ./website/build
@@ -949,7 +949,7 @@ jobs:
949949
950950
- name: Deploy
951951
uses: peaceiris/actions-gh-pages@v3
952-
if: github.ref == 'refs/heads/main'
952+
if: ${{ github.ref == 'refs/heads/main' }}
953953
with:
954954
github_token: ${{ secrets.GITHUB_TOKEN }}
955955
publish_dir: ./site
@@ -990,7 +990,7 @@ jobs:
990990
991991
- name: Deploy
992992
uses: peaceiris/actions-gh-pages@v3
993-
if: github.ref == 'refs/heads/main'
993+
if: ${{ github.ref == 'refs/heads/main' }}
994994
with:
995995
github_token: ${{ secrets.GITHUB_TOKEN }}
996996
publish_dir: ./book
@@ -1034,7 +1034,7 @@ jobs:
10341034
10351035
- name: Deploy
10361036
uses: peaceiris/actions-gh-pages@v3
1037-
if: github.ref == 'refs/heads/main'
1037+
if: ${{ github.ref == 'refs/heads/main' }}
10381038
with:
10391039
github_token: ${{ secrets.GITHUB_TOKEN }}
10401040
publish_dir: ./build/web
@@ -1083,7 +1083,7 @@ jobs:
10831083

10841084
- name: Deploy
10851085
uses: peaceiris/actions-gh-pages@v3
1086-
if: github.ref == 'refs/heads/main'
1086+
if: ${{ github.ref == 'refs/heads/main' }}
10871087
with:
10881088
github_token: ${{ secrets.GITHUB_TOKEN }}
10891089
publish_dir: ./public
@@ -1169,7 +1169,7 @@ jobs:
11691169

11701170
- name: Deploy to GitHub Pages
11711171
uses: peaceiris/actions-gh-pages@v3
1172-
if: github.ref == 'refs/heads/main'
1172+
if: ${{ github.ref == 'refs/heads/main' }}
11731173
with:
11741174
github_token: ${{ secrets.GITHUB_TOKEN }}
11751175
publish_dir: ./Output

0 commit comments

Comments
 (0)