-
Notifications
You must be signed in to change notification settings - Fork 77
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update GH action deployment settings
- Loading branch information
1 parent
f1b1c09
commit 6631607
Showing
1 changed file
with
28 additions
and
27 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,6 +1,6 @@ | ||
on: | ||
push: | ||
branches: [main, master] | ||
branches: [main, dev] | ||
|
||
name: Build Site | ||
|
||
|
@@ -10,11 +10,16 @@ jobs: | |
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
steps: | ||
|
||
- name: Checkout project | ||
uses: actions/checkout@v4.1.1 | ||
uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
|
@@ -25,25 +30,9 @@ jobs: | |
with: | ||
version: 1.0.37 | ||
|
||
- name: Install Linux system dependencies | ||
- name: Install dependencies | ||
run: | | ||
sudo apt-get install -y make | ||
sudo apt-get install -y libcurl4-openssl-dev | ||
sudo apt-get install -y libssl-dev | ||
sudo apt-get install -y libfontconfig1-dev | ||
sudo apt-get install -y libfreetype6-dev | ||
sudo apt-get install -y libfribidi-dev | ||
sudo apt-get install -y libharfbuzz-dev | ||
sudo apt-get install -y libjpeg-dev | ||
sudo apt-get install -y libpng-dev | ||
sudo apt-get install -y libtiff-dev | ||
sudo apt-get install -y libicu-dev | ||
sudo apt-get install -y pandoc | ||
sudo apt-get install -y libxml2-dev | ||
sudo apt-get install -y libgit2-dev | ||
sudo apt-get install -y libssh2-1-dev | ||
sudo apt-get install -y zlib1g-dev | ||
sudo apt-get install -y git | ||
sudo apt-get install -y make libcurl4-openssl-dev libssl-dev libfontconfig1-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev libjpeg-dev libpng-dev libtiff-dev libicu-dev pandoc libxml2-dev libgit2-dev libssh2-1-dev zlib1g-dev git | ||
- name: Install devtools | ||
run: install.packages("devtools") | ||
|
@@ -58,13 +47,25 @@ jobs: | |
shell: Rscript {0} | ||
|
||
- name: Build site | ||
run: adodownr::build_site(pkg_dir = here::here(), site_dir = here::here(), rm_old_site_dir = FALSE) | ||
run: adodownr::build_site(pkg_dir = here::here(), site_dir = here::here()) | ||
shell: Rscript {0} | ||
|
||
- name: Deploy to GitHub pages | ||
uses: JamesIves/github-pages-[email protected] | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
with: | ||
clean: true | ||
folder: docs | ||
branch: gh-pages | ||
target-folder: docs | ||
path: ./docs | ||
|
||
deploy: | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{steps.deployment.outputs.page_url}} | ||
runs-on: ubuntu-latest | ||
needs: adodownr | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v2 |