-
Notifications
You must be signed in to change notification settings - Fork 5
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
fba025a
commit ca77d4b
Showing
1 changed file
with
38 additions
and
41 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,54 +1,51 @@ | ||
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples | ||
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Publish Quarto page to GitHub Pages | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
name: render | ||
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
# Allow one concurrent deployment | ||
concurrency: | ||
group: "pages" | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
render: | ||
# Single deploy job since we're just deploying | ||
publish-site: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
runs-on: ubuntu-latest | ||
# Only restrict concurrency for non-PR jobs | ||
concurrency: | ||
group: render-${{ github.event_name != 'pull_request' || github.run_id }} | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
container: | ||
image: ghcr.io/dukestatsci/r_gh_actions:latest | ||
steps: | ||
- name: Generate Locales used in Package within | ||
run: | | ||
sudo locale-gen it_IT.UTF-8 | ||
sudo locale-gen pl_PL.UTF-8 | ||
sudo locale-gen pt_BR.UTF-8 | ||
sudo locale-gen en_GB.UTF-8 | ||
sudo locale-gen fr_FR | ||
sudo locale-gen en_CA | ||
- uses: actions/checkout@v4 | ||
- uses: r-lib/actions/setup-r@v2 | ||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
|
||
- name: Configure Git user | ||
- name: Build site | ||
run: | | ||
git config --global user.name "$GITHUB_ACTOR" | ||
git config --global user.email "[email protected]" | ||
- uses: actions/checkout@v3 | ||
quarto render | ||
- uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
|
||
- name: Render book | ||
run: quarto render | ||
|
||
path: '_book/' | ||
|
||
- name: Deploy to GitHub Pages | ||
id: gh-pages-deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: _book | ||
|
||
id: deployment | ||
uses: actions/deploy-pages@v1 |