11---
22name : Build Jekyll
3+ permissions :
4+ contents : read
35
46on :
57 workflow_call :
@@ -83,14 +85,14 @@ jobs:
8385 path : theme
8486
8587 - name : Download input artifact
86- if : ${{ inputs.site_artifact != '' }}
88+ if : inputs.site_artifact != ''
8789 uses : actions/download-artifact@v4
8890 with :
8991 name : ${{ inputs.site_artifact }}
9092 path : project
9193
9294 - name : Extract archive
93- if : ${{ inputs.site_artifact != '' && inputs.extract_archive != '' }}
95+ if : inputs.site_artifact != '' && inputs.extract_archive != ''
9496 working-directory : project
9597 run : |
9698 case "${{ inputs.extract_archive }}" in
@@ -111,7 +113,7 @@ jobs:
111113 rm -f "${{ inputs.extract_archive }}"
112114
113115 - name : Setup project
114- if : ${{ github.repository == 'LizardByte/LizardByte.github.io' }}
116+ if : github.repository == 'LizardByte/LizardByte.github.io'
115117 run : |
116118 mkdir -p ./project
117119 cp -RT ./theme/ ./project/
@@ -172,8 +174,7 @@ jobs:
172174 ruby-version : ' 3.3'
173175
174176 - name : Install dependencies
175- run : |
176- bundle install
177+ run : bundle install
177178
178179 - name : Setup Pages
179180 id : configure-pages
@@ -208,8 +209,7 @@ jobs:
208209
209210 - name : Prepare Artifacts # uploading artifacts may fail if not zipped due to very large quantity of files
210211 shell : bash
211- run : |
212- 7z a _site.zip ./_site/*
212+ run : 7z a _site.zip ./_site/*
213213
214214 - name : Upload artifact
215215 uses : actions/upload-artifact@v4
@@ -224,8 +224,8 @@ jobs:
224224 name : Deploy to Pages
225225 if : >-
226226 (github.event_name == 'push' && github.ref == 'refs/heads/master') ||
227- ( github.event_name == 'schedule') ||
228- ( github.event_name == 'workflow_dispatch')
227+ github.event_name == 'schedule' ||
228+ github.event_name == 'workflow_dispatch'
229229 runs-on : ubuntu-latest
230230 needs : build
231231 steps :
@@ -237,11 +237,10 @@ jobs:
237237 persist-credentials : false # otherwise, the token used is the GITHUB_TOKEN, instead of the personal token
238238 fetch-depth : 0 # otherwise, will fail to push refs to dest repo
239239
240+ # empty contents of gh-pages
240241 - name : Clean
241- if : ${{ inputs.clean_gh_pages }}
242- run : |
243- # empty contents of gh-pages
244- rm -f -r ./gh-pages/*
242+ if : inputs.clean_gh_pages
243+ run : rm -f -r ./gh-pages/*
245244
246245 - name : Download artifact
247246 uses : actions/download-artifact@v4
0 commit comments