diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 2ca515a..518698b 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -10,7 +10,9 @@ on: jobs: BuildAndDeploy: runs-on: ubuntu-latest - permissions: write-all + permissions: + contents: write + steps: - uses: actions/checkout@v4 with: @@ -23,9 +25,19 @@ jobs: - run: julia --color=yes --project -e ' using Pkg; Pkg.instantiate(); using CSL_Chinese; CSL_Chinese.build()' - - name: Deploy to gh-pages branch - uses: JamesIves/github-pages-deploy-action@releases/v3 + + #- name: Deploy to gh-pages branch + # uses: JamesIves/github-pages-deploy-action@releases/v3 + # with: + # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + # BRANCH: gh-pages + # FOLDER: _build + + - name: Deploy to secondary branch + if: ${{ github.event_name != 'pull_request' }} + uses: peaceiris/actions-gh-pages@v4 with: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - BRANCH: gh-pages - FOLDER: _build + github_token: ${{ secrets.GITHUB_TOKEN }} + force_orphan: true + publish_branch: gh-pages + publish_dir: ./_build/ diff --git a/metadata.yml b/metadata.yml index 79861a7..933076a 100644 --- a/metadata.yml +++ b/metadata.yml @@ -4,7 +4,7 @@ subtitle: "" author: - Mao Zhou -repo: +repo: https://github.com/ZMAlt/CSL_Chinese secPrefix: Section allow-subsubsections: true