-
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
52b60d0
commit 2b2c84e
Showing
1 changed file
with
41 additions
and
40 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,53 +1,54 @@ | ||
# Simple workflow for deploying static content to GitHub Pages | ||
name: Publish Quarto page to GitHub Pages | ||
|
||
# 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 | ||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["main"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
branches: [main, master] | ||
pull_request: | ||
branches: [main, master] | ||
workflow_dispatch: | ||
|
||
# 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 | ||
name: render | ||
|
||
jobs: | ||
# Single deploy job since we're just deploying | ||
publish-site: | ||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
render: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/dukestatsci/r_gh_actions: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 }} | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- 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 | ||
- name: Configure Git user | ||
run: | | ||
git config --global user.name "$GITHUB_ACTOR" | ||
git config --global user.email "[email protected]" | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
|
||
- uses: r-lib/actions/setup-r-dependencies@v2 | ||
|
||
- name: Build site | ||
run: | | ||
quarto render | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v1 | ||
with: | ||
path: '_book/' | ||
|
||
|
||
- name: Render book | ||
run: quarto render | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v1 | ||
id: gh-pages-deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
with: | ||
branch: gh-pages | ||
folder: _book | ||
|