Closed stephan-koenig closed 3 years ago
I just realized that this PR addresses issue #39.
one could also move to v3 by changing checkout-and-deploy step 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 }}
Agreed, my PR switches to v3.
Hi,
The previous version of
deploy_bookdowm.yml
usedCecilapp/GitHub-Pages-deploy@master
, but the action changed with this latest version,Cecilapp/GitHub-Pages-deploy@v3
. The action now uses GITHUB_TOKEN and input parameters, see:https://github.com/Cecilapp/GitHub-Pages-deploy/blob/12981df74c347334d5b2f178d116c00092bf34f8/README.md
As a result, the previous version of
deploy_bookdown.yml
currently fails with the errorcp: can't stat '_site/*': No such file or directory
because environmental variableBUILD_DIR
must now be provided as input parameterbuild_dir
.Another possible solution is to specify the previous version of the action with
Cecilapp/GitHub-Pages-deploy@v2
, which still exclusively uses environment variables.Best,
Stephan