-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* adding files for actions deployment * adding files for actions deployment * ci: Use GitHub Actions site deployment * Add GitHub Actions based publishing of the website using GitHub Actions as the publishing source for GitHub Pages. * docs: Update README with publishing notes --------- Co-authored-by: Matthew Feickert <[email protected]>
- Loading branch information
1 parent
ad23a5f
commit 3f71bbf
Showing
8 changed files
with
3,027 additions
and
4 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 |
---|---|---|
@@ -0,0 +1,78 @@ | ||
name: Publish site | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
workflow_dispatch: | ||
|
||
concurrency: | ||
group: ${{ github.workflow }}-${{ github.ref }} | ||
cancel-in-progress: true | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Check out repository | ||
uses: actions/checkout@v4 | ||
|
||
- name: Set up Quarto | ||
uses: quarto-dev/quarto-actions/setup@v2 | ||
|
||
- name: Install R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: '4.4.0' | ||
|
||
- name: Install R Dependencies | ||
uses: r-lib/actions/setup-renv@v2 | ||
with: | ||
cache-version: 1 | ||
|
||
- name: Render Quarto Project | ||
uses: quarto-dev/quarto-actions/render@v2 | ||
with: | ||
to: html | ||
|
||
- name: List site structure | ||
run: tree -L 2 docs/ | ||
|
||
- name: Fix permissions if needed | ||
run: | | ||
chmod -c -R +rX "docs/" | while read line; do | ||
echo "::warning title=Invalid file permissions automatically fixed::$line" | ||
done | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: 'docs/' | ||
|
||
deploy: | ||
name: Deploy docs to GitHub Pages | ||
if: github.event_name == 'push' && github.ref == 'refs/heads/main' | ||
needs: build | ||
# Set permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{ steps.deployment.outputs.page_url }} | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Setup Pages | ||
uses: actions/configure-pages@v5 | ||
|
||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
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 |
---|---|---|
|
@@ -3,6 +3,7 @@ | |
*.Rproj | ||
.Rproj.user/ | ||
.DS_Store | ||
.Rprofile | ||
|
||
# Directories | ||
/.quarto/ | ||
/.quarto/ |
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
Oops, something went wrong.