helaili / jekyll-action

A GitHub Action to publish Jekyll based content as a GitHub Pages site
MIT License
250 stars 120 forks source link

Address issue #98: set CNAME file #102

Closed bwilczek closed 1 year ago

bwilczek commented 3 years ago

This PR addresses issue #98

It allows passing the desired contents for the CNAME file using cname input for the action.

It resolves the issue of custom domain support for GitHub Pages.

msangel commented 3 years ago

@bwilczek thank! I have tested this with my configuration and it works well: https://github.com/msangel/msangel.github.io/runs/3035438121 I can live with this)))))

But @helaili can consider merge this

noah978 commented 2 years ago

Can confirm that this solution works and I believe it would be a good merge. At the moment I have to do

jobs:
  build_jekyll:
    runs-on: ubuntu-latest
    steps:
      - uses: actions/checkout@v2
      # Create custom domain CNAME
      - run: |
          echo customdomain.com  > CNAME
      # Use GitHub Jekyll Action to build to repository branch
      - uses: helaili/jekyll-action@v2
        with:
          token: ${{ secrets.GH_TOKEN }}
          target_branch: 'gh-pages'

but with this merge, I just supply it as an argument. It's a much better and cleaner solution.

espoirMur commented 2 years ago

+100 for this..

@bwilczek, can you update the readme file to reflect the changes.