forked from pchelle/OSPSuite.Addins
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from pchelle/1_website
Fixes #1 build website
- Loading branch information
Showing
3 changed files
with
46 additions
and
0 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 |
---|---|---|
|
@@ -3,3 +3,4 @@ | |
^LICENSE\.md$ | ||
^README\.Rmd$ | ||
^cran-comments\.md$ | ||
^\.github$ |
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 @@ | ||
*.html |
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,44 @@ | ||
name: Update website | ||
on: | ||
push: | ||
branches: | ||
- main | ||
|
||
# The action needs permissions to update the branch | ||
permissions: | ||
contents: write | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
jobs: | ||
update-website: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
- name: Setup | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
use-public-rspm: true | ||
# No need to install ospsuite ecosystem | ||
# because the job only needs to display the md reports as html pages | ||
- name: Packages to build website | ||
uses: r-lib/actions/setup-r-dependencies@v2 | ||
with: | ||
extra-packages: any::rmarkdown, any::pkgdown | ||
# The script temporarily create index and vignettes for pkgdown to build site | ||
- name: Build pkgdown website | ||
run: | | ||
pkgdown::build_site() | ||
shell: Rscript {0} | ||
- name: Deploy | ||
uses: JamesIves/github-pages-deploy-action@v4 | ||
# The deployment folder should match the name of the artifact. | ||
# Clean is false to prevent removing release site | ||
# only target folder of repo from gh-pages branch is updated | ||
with: | ||
folder: docs | ||
clean: true | ||
branch: gh-pages | ||
target-folder: docs | ||
token: ${{ secrets.GITHUB_TOKEN }} |