diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b89972d..d1de465 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -112,7 +112,6 @@ jobs: pages: runs-on: ubuntu-latest needs: build # build documentation only when all tests pass - if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} permissions: contents: write @@ -155,11 +154,17 @@ jobs: path: ${{ steps.setup.outputs.cabal-store }} key: ${{ steps.cache.outputs.cache-primary-key }} + - name: Resolve path + id: doc_dir + run: | + DOC_DIR=$(ls -d dist-newstyle/build/x86_64-linux/ghc-*/traq-*/doc/html/traq) + echo "doc_dir=$DOC_DIR" >> "$GITHUB_OUTPUT" + - name: Deploy to GH pages uses: peaceiris/actions-gh-pages@v4 if: ${{ github.event_name == 'push' && github.ref == 'refs/heads/main' }} with: publish_branch: gh-pages github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./dist-newstyle/build/x86_64-linux/ghc-9.6.7/traq-*/doc/html/traq/ + publish_dir: ${{ steps.doc_dir.outputs.doc_dir }} force_orphan: true