docs: update installation guide #68
This file contains hidden or 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
| on: | |
| push: | |
| branches: main | |
| workflow_dispatch: | |
| name: pkgdown | |
| jobs: | |
| pkgdown: | |
| runs-on: ubuntu-latest | |
| if: "contains(github.event.head_commit.message, 'sitedeploy')" | |
| env: | |
| GITHUB_PAT: ${{ secrets.GH_PAT }} | |
| steps: | |
| - uses: actions/checkout@v2 | |
| - name: Setup Git credentials for private repos | |
| run: | | |
| git config --global url."https://${{ secrets.GH_PAT }}@github.com/".insteadOf "https://github.com/" | |
| - uses: r-lib/actions/setup-r@v2 | |
| with: | |
| r-version: 'release' | |
| use-public-rspm: true | |
| - uses: r-lib/actions/setup-pandoc@v2 | |
| # riskintrodata is installed because of the Remotes field in DESCRIPTION file!! | |
| - uses: r-lib/actions/setup-r-dependencies@v2 | |
| with: | |
| extra-packages: | |
| any::pkgdown | |
| - name: Install package | |
| run: R CMD INSTALL . | |
| - name: Render README | |
| run: | | |
| Rscript -e 'rmarkdown::render("README.Rmd")' | |
| - name: Deploy package | |
| run: | | |
| git config --local user.email "[email protected]" | |
| git config --local user.name "GitHub Actions" | |
| Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE, clean = TRUE)' |