diff --git a/.github/workflows/gh-pages-fast.yml b/.github/workflows/gh-pages-fast.yml index d5afdff..4ea519c 100644 --- a/.github/workflows/gh-pages-fast.yml +++ b/.github/workflows/gh-pages-fast.yml @@ -76,12 +76,13 @@ jobs: TZ: "Asia/Tokyo" run: | # Use pre-built ailog binary instead of cargo build - ./bin/ailog build --output ./public + cd my-blog + ../bin/ailog build touch ./public/.nojekyll - name: Deploy uses: peaceiris/actions-gh-pages@v3 with: github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./public + publish_dir: ./my-blog/public publish_branch: gh-pages \ No newline at end of file diff --git a/action.yml b/action.yml index 6355d88..9b16a8a 100644 --- a/action.yml +++ b/action.yml @@ -100,12 +100,15 @@ runs: run: | start_time=$(date +%s) - ./bin/ailog-linux-x86_64 build \ - --content ${{ inputs.content-dir }} \ - --output ${{ inputs.output-dir }} \ - --templates ${{ inputs.template-dir }} \ - --static ${{ inputs.static-dir }} \ - --config ${{ inputs.config-file }} + # Change to blog directory and run build + # Note: ailog build only takes a path argument, not options + if [ -d "my-blog" ]; then + cd my-blog + ../bin/ailog-linux-x86_64 build + else + # If no my-blog directory, use current directory + ./bin/ailog-linux-x86_64 build . + fi end_time=$(date +%s) build_time=$((end_time - start_time))