OSDN Git Service

Fix github actions
authorbillchenchina <billchenchina2001@gmail.com>
Wed, 27 Jan 2021 12:49:25 +0000 (20:49 +0800)
committerbillchenchina <billchenchina2001@gmail.com>
Wed, 27 Jan 2021 13:47:15 +0000 (21:47 +0800)
.github/workflows/build.yml

index 9af2c9e..41aa012 100644 (file)
@@ -36,11 +36,12 @@ jobs:
       - name: Generate redirects
         run: python scripts/gen_redirect.py
       - name: Deploy to gh-pages
-        if: ${{ github.event_name == push }}
+        if: ${{ github.event_name == 'push' }}
         uses: peaceiris/actions-gh-pages@v3
         with:
-          - github_token: ${{ secrets.GITHUB_TOKEN }}
-          - publish_dir: ./site
+          github_token: ${{ secrets.GITHUB_TOKEN }}
+          publish_dir: ./site
+          force_orphan: true
       - name: BaiduPusher
-        if: ${{ github.event_name == push && env.BaiduToken }}
+        if: ${{ github.event_name == 'push' && env.BaiduToken }}
         run: chmod +x scripts/BaiduPusher.sh && ./scripts/BaiduPusher.sh