@@ -106,37 +106,3 @@ jobs:
106
106
workingDirectory: r-package/grf
107
107
displayName: Valgrind check
108
108
condition: eq(variables['Agent.OS'], 'Linux')
109
- # Final deploy step:
110
- # Build the online docs and deploy to gh-pages - only done on master branch with Linux image.
111
- # `GITHUB_PAT` is a GitHub access token stored on Azure Pipelines.
112
- - script : |
113
- set -e
114
- sudo apt-get install -qq pandoc
115
- # Lock in a previous version of `pkgdown` and its dependencies.
116
- sudo Rscript -e "install.packages(c('fs', 'highlight', 'httr', 'memoise', 'openssl', 'purrr', 'rmarkdown', 'rstudioapi', 'whisker', 'xml2', 'yaml'))"
117
- sudo Rscript -e "install.packages('https://cran.r-project.org/src/contrib/Archive/pkgdown/pkgdown_1.5.1.tar.gz', repos = NULL, type = 'source')"
118
- # Install dependencies needed for vignettes.
119
- sudo Rscript -e "install.packages(c('DiagrammeR', 'ggplot2', 'glmnet', 'maq', 'policytree', 'rdd'))"
120
- cp ../../README.md .
121
- cp ../../REFERENCE.md .
122
- cp ../../DEVELOPING.md .
123
- cp ../../releases/CHANGELOG.md .
124
- # Build and deploy page. This requires that the branch `gh-pages` exists.
125
- # git worktree is used to only commit the doc folder (docs/) as the root.
126
- # update-ref is used to not keep a commit history of the generated docs.
127
- git config --local user.email "[email protected] "
128
- git config --local user.name "Azure Pipelines"
129
- git worktree add -B gh-pages docs/ origin/gh-pages
130
- rm -rf docs/*
131
- Rscript -e "pkgdown::build_site()"
132
- cd docs
133
- git add --all
134
- git update-ref -d refs/heads/gh-pages
135
- git commit --allow-empty -m "Update gh-pages ***NO_CI***"
136
- git push --force https://$(GITHUB_PAT)@github.com/grf-labs/grf.git HEAD:gh-pages
137
- workingDirectory: r-package/grf
138
- displayName: 'Publish GitHub Pages'
139
- condition: |
140
- and(eq(variables['Agent.OS'], 'Linux'),
141
- and(not(eq(variables['Build.Reason'], 'PullRequest')),
142
- eq(variables['Build.SourceBranch'], 'refs/heads/master')))
0 commit comments