Cecilapp / Action

This GitHub Action builds a static site with Cecil.
https://github.com/marketplace/actions/cecil-action
MIT License
5 stars 1 forks source link

Phantom Workflow #3

Open bbonora opened 8 months ago

bbonora commented 8 months ago

Hello,

Thanks for putting this together. I've really been loving using Cecil and think it's a great static site generator.

I wanted to use Github Actions to deploy my Cecil site to Github Pages. I cut and pasted the example workflow file contained in the Readme.md into my .github/workflows folder on my project but I'm getting strange results. When the action runs I'm seeing two workflows being executed - One is called Build and deploy to GitHub Pages and the other is called pages-build-deploy. I can't find this workflow anywhere in my workflows file and I think it's building a Jekyll site instead of a Cecil site. Below I've included a screenshot of what I'm seeing along with my workflow file. Any help would be much appreciated.

image

# .github/workflows/website.yml

name: Build and deploy to GitHub Pages
on:
  push:
    branches: [main] # or [master]
  workflow_dispatch: # run manually

permissions:
  contents: read
  pages: write
  id-token: write

concurrency:
  group: "pages"
  cancel-in-progress: true

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout source
        uses: actions/checkout@v4

      - name: Setup PHP
        uses: shivammathur/setup-php@v2
        with:
          php-version: '8.1'
          extensions: fileinfo, gd, mbstring

      - name: Build site
        uses: Cecilapp/Cecil-Action@v3

      - name: Upload artifact
        uses: actions/upload-pages-artifact@v2

  deploy:
    needs: build
    environment:
      name: github-pages
      url: ${{ steps.deployment.outputs.page_url }}
    runs-on: ubuntu-latest
    steps:
      - name: Deploy to GitHub Pages
        id: deployment
        uses: actions/deploy-pages@v3
ArnaudLigny commented 8 months ago

Hello @bbonora, I think it's related to the way Pages are deployed : to use the method provided by the example you must enable the option "Publishing with a custom GitHub Actions workflow" (https://docs.github.com/en/pages/getting-started-with-github-pages/configuring-a-publishing-source-for-your-github-pages-site#publishing-with-a-custom-github-actions-workflow).

Tell me if it's OK for you and I will update the Readme accordingly.