helaili / jekyll-action

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

Action breaks deploys using a custom domain #46

Closed tinacious closed 4 years ago

tinacious commented 4 years ago

I have a repository for a project (not my username), e.g. project-name, that uses my custom domain, e.g. example.com.

After every successful run, the Custom Domain section is blank. This causes my site to 404 because Github doesn't know how to resolve my domain since the setting for it has been removed from the repository settings.

image

When I set it back to my custom domain, it works again.

This is my action:

# This is a basic workflow to help you get started with Actions

name: Github Pages Deployment

# Controls when the action will run. Triggers the workflow on push or pull request
# events but only for the master branch
on:
  push:
    branches: [ master ]

# A workflow run is made up of one or more jobs that can run sequentially or in parallel
jobs:
  # This workflow contains a single job called "build"
  build:
    # The type of runner that the job will run on
    runs-on: ubuntu-latest

    # Steps represent a sequence of tasks that will be executed as part of the job
    steps:
    # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it
    - uses: actions/checkout@v2
    - uses: helaili/jekyll-action@2.0.1
      env:
        JEKYLL_PAT: ${{ secrets.JEKYLL_PAT }}
tinacious commented 4 years ago

I've added a follow up re: alternative config on an open PR: https://github.com/helaili/jekyll-action/pull/39#issuecomment-657146133

tinacious commented 4 years ago

Ultimately, as mentioned in a comment for that PR that addresses this concern (https://github.com/helaili/jekyll-action/pull/39#issuecomment-657147242), I think explicitly having a section in the docs on how to work with custom domains would be a good approach to solving the currently cumbersome experience with custom domains for those of us that have configured it via the repository settings.

helaili commented 4 years ago

Fixed by #39