mirror of
https://github.com/peaceiris/actions-gh-pages.git
synced 2025-07-14 14:16:00 +08:00
fix: Improve if syntax
This commit is contained in:
parent
90e01d5ddd
commit
f7a748bfc9
6
.github/workflows/test.yml
vendored
6
.github/workflows/test.yml
vendored
@ -81,19 +81,19 @@ jobs:
|
|||||||
run: npm run build
|
run: npm run build
|
||||||
|
|
||||||
- name: Remove lint-staged husky
|
- name: Remove lint-staged husky
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
run: |
|
run: |
|
||||||
npm uninstall lint-staged husky
|
npm uninstall lint-staged husky
|
||||||
git checkout package-lock.json package.json
|
git checkout package-lock.json package.json
|
||||||
|
|
||||||
- name: Setup mdBook
|
- name: Setup mdBook
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
uses: peaceiris/actions-mdbook@v1.1.14
|
uses: peaceiris/actions-mdbook@v1.1.14
|
||||||
with:
|
with:
|
||||||
mdbook-version: '0.4.5'
|
mdbook-version: '0.4.5'
|
||||||
|
|
||||||
- name: Build site
|
- name: Build site
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
working-directory: ./test_projects/mdbook
|
working-directory: ./test_projects/mdbook
|
||||||
run: mdbook build
|
run: mdbook build
|
||||||
|
|
||||||
|
22
README.md
22
README.md
@ -162,7 +162,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -672,7 +672,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -722,7 +722,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -777,7 +777,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./out
|
publish_dir: ./out
|
||||||
@ -828,7 +828,7 @@ jobs:
|
|||||||
|
|
||||||
- name: deploy
|
- name: deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./dist
|
publish_dir: ./dist
|
||||||
@ -887,7 +887,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./website/build
|
publish_dir: ./website/build
|
||||||
@ -949,7 +949,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./site
|
publish_dir: ./site
|
||||||
@ -990,7 +990,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./book
|
publish_dir: ./book
|
||||||
@ -1034,7 +1034,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./build/web
|
publish_dir: ./build/web
|
||||||
@ -1083,7 +1083,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy
|
- name: Deploy
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./public
|
publish_dir: ./public
|
||||||
@ -1169,7 +1169,7 @@ jobs:
|
|||||||
|
|
||||||
- name: Deploy to GitHub Pages
|
- name: Deploy to GitHub Pages
|
||||||
uses: peaceiris/actions-gh-pages@v3
|
uses: peaceiris/actions-gh-pages@v3
|
||||||
if: github.ref == 'refs/heads/main'
|
if: ${{ github.ref == 'refs/heads/main' }}
|
||||||
with:
|
with:
|
||||||
github_token: ${{ secrets.GITHUB_TOKEN }}
|
github_token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
publish_dir: ./Output
|
publish_dir: ./Output
|
||||||
|
Loading…
x
Reference in New Issue
Block a user