Closed bchwtz closed 3 years ago
Can be solved as follows:
# Need to first create an empty gh-pages branch
# see https://pkgdown.r-lib.org/reference/deploy_site_github.html
# and also add secrets for a GH_PAT and EMAIL to the repository
# gh-action from Cecilapp/GitHub-Pages-deploy
checkout-and-deploy:
runs-on: ubuntu-latest
needs: bookdown
steps:
- name: Checkout
uses: actions/checkout@master
- name: Download artifact
uses: actions/download-artifact@v1.0.0
with:
# Artifact name
name: _book # optional
# Destination path
path: _book # optional
- name: Deploy to GitHub Pages
uses: Cecilapp/GitHub-Pages-deploy@v3
with:
build_dir: _book/
email: ${{ secrets.EMAIL }}
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Thanks @stephan-koenig and @lachlandeer this PR https://github.com/orchid00/actions_sandbox/pull/40 addresses the changes
just realised I still need to change the examples /actions_sandbox/websites-using-pkgdown-bookdown-and-blogdown.html#deploy-bookdown
So guys I fixed the texts and the examples you can have a look, if anything needs to be fixed please ping me.
Could you also please, have a look at issue https://github.com/orchid00/actions_sandbox/issues/41 I feel you might be able to help enlightening me.
Thank you for creating this guide. During the holidays the authentication in the Cecilapp/GitHub-Pages-deploy workflow changed and now your examples cause errors, because they still refer to the master branch.
A quick fix is replacing all master branch references with a new one referring to v2 (
Cecilapp/GitHub-Pages-deploy@v2
). Here is what worked for me with bookdown. However in the long rung it may make sense to follow the transition and use secrets instead of the PAT as well.