Skip to content

Commit 63ea8d9

Browse files
authored
Deploy to GitHub pages (#1805)
* Deploy to GitHub pages * Update for dbplyr
1 parent 14bdb11 commit 63ea8d9

File tree

3 files changed

+219
-79
lines changed

3 files changed

+219
-79
lines changed

.github/workflows/bookdown.yaml

+23-17
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,10 @@ on:
77
branches: [main, master]
88
workflow_dispatch:
99

10-
name: bookdown
10+
name: bookdown.yaml
1111

1212
jobs:
13-
bookdown:
13+
build:
1414
runs-on: ubuntu-latest
1515
# Only restrict concurrency for non-PR jobs
1616
concurrency:
@@ -39,19 +39,25 @@ jobs:
3939
run: bookdown::render_book("index.Rmd", quiet = TRUE)
4040
shell: Rscript {0}
4141

42-
- name: Deploy to Netlify
43-
if: contains(env.isExtPR, 'false')
44-
id: netlify-deploy
45-
uses: nwtgck/[email protected]
42+
- name: Upload website artifact
43+
if: ${{ github.ref == 'refs/heads/main' || github.ref == 'refs/heads/master' }}
44+
uses: actions/upload-pages-artifact@v3
4645
with:
47-
publish-dir: './_book'
48-
production-branch: master
49-
github-token: ${{ secrets.GITHUB_TOKEN }}
50-
deploy-message:
51-
'Deploy from GHA: ${{ github.event.pull_request.title || github.event.head_commit.message }} (${{ github.sha }})'
52-
enable-pull-request-comment: false
53-
enable-commit-comment: false
54-
env:
55-
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
56-
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
57-
timeout-minutes: 1
46+
path: "_book"
47+
48+
deploy:
49+
needs: build
50+
51+
permissions:
52+
pages: write # to deploy to Pages
53+
id-token: write # to verify the deployment originates from an appropriate source
54+
55+
environment:
56+
name: github-pages
57+
url: ${{ steps.deployment.outputs.page_url }}
58+
59+
runs-on: ubuntu-latest
60+
steps:
61+
- name: Deploy to GitHub Pages
62+
id: deployment
63+
uses: actions/deploy-pages@v4

.gitignore

+2
Original file line numberDiff line numberDiff line change
@@ -14,3 +14,5 @@ _book
1414
_main.*
1515
adv-r-source.zip
1616
crc
17+
18+
/.quarto/

0 commit comments

Comments
 (0)