Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Custom domain support #25

Closed
igaryhe opened this issue Sep 17, 2019 · 3 comments
Closed

Custom domain support #25

igaryhe opened this issue Sep 17, 2019 · 3 comments
Labels

Comments

@igaryhe
Copy link

igaryhe commented Sep 17, 2019

The current version of the action seems like it doesn't support custom domain. It would be great if we could set the CNAME via the deploy command.

@peaceiris
Copy link
Owner

How about the following?

    - name: Build
      run: |
        hugo --gc --minify --cleanDestinationDir
        cp ./path/to/CNAME ./public/CNAME

    - name: Deploy
      uses: peaceiris/actions-gh-pages@v2.3.1
      env:
        ACTIONS_DEPLOY_KEY: ${{ secrets.ACTIONS_DEPLOY_KEY }}
        PUBLISH_BRANCH: gh-pages
        PUBLISH_DIR: ./public

And, most of the Static Site Generators can support CNAME as static files.

How Gatsby Works with GitHub Pages | GatsbyJS

Note: Don’t forget to add your CNAME file to the static directory.

The same may be said of other files (.nojekyll BingSiteAuth.xml robots.txt). I think that it is better to manage those files by Static Site Generators.

@igaryhe
Copy link
Author

igaryhe commented Sep 17, 2019

Oh, I see. I used to set the CNAME via TravisCI, and it seems better to set it in the project.

@github-actions
Copy link
Contributor

This issue has been LOCKED because of it being resolved!

The issue has been fixed and is therefore considered resolved.
If you still encounter this or it has changed, open a new issue instead of responding to solved ones.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jun 25, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

No branches or pull requests

2 participants