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

Enable gh pages deployment for gh Actions-based workflow #345

Closed
milesfrain opened this issue May 18, 2021 · 4 comments
Closed

Enable gh pages deployment for gh Actions-based workflow #345

milesfrain opened this issue May 18, 2021 · 4 comments

Comments

@milesfrain
Copy link
Member

I was hoping that merging #343 or #344 would deploy the latest version of the book to gh pages, but it's skipping deployment with this error:

This action runs on a fork and not found auth token, Skip deployment

https://github.com/purescript-contrib/purescript-book/actions/runs/854860824

Here's the relevant code:

- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: github.ref == 'refs/heads/master'
with:
deploy_key: ${{ secrets.GITHUB_REPO_DEPLOY_KEY }}
publish_dir: ./book
cname: book.purescript.org

Thinking it could either be due to an incompatibility of github.ref == 'refs/heads/master' with this repo being a fork of paf31's version, or that GITHUB_REPO_DEPLOY_KEY is unavailable.

Documentation for this action is available in https://github.com/peaceiris/actions-gh-pages#options

@hdgarrood , we worked through this before in #82. I was hoping that GITHUB_REPO_DEPLOY_KEY would still be available for use, but can't inspect the repo's secrets myself to double-check. Could you take a look at this?

@milesfrain
Copy link
Member Author

Found some more evidence that this is an issue with an empty GITHUB_REPO_DEPLOY_KEY (assigned to deploy_key). It should work on forks if deploy_key is non-empty.

This version can skip deployment on forks when deploy_key or personal_token is empty.

peaceiris/actions-gh-pages#153 (comment)

@hdgarrood
Copy link

There are no secrets configured for this repo right now; I guess I removed the deploy key after we ended up not using it for Travis. I can try adding one again shortly.

@hdgarrood
Copy link

According to https://github.com/peaceiris/actions-gh-pages, GitHub automatically creates a token called GITHUB_TOKEN and this doesn't require any setup. That seems ideal. Could you try doing it that way?

@milesfrain
Copy link
Member Author

Fixed by #346

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Development

No branches or pull requests

2 participants