Skip to content

Commit

Permalink
update GH action deployment settings
Browse files Browse the repository at this point in the history
  • Loading branch information
kbjarkefur committed Jun 17, 2024
1 parent f1b1c09 commit 6631607
Showing 1 changed file with 28 additions and 27 deletions.
55 changes: 28 additions & 27 deletions .github/workflows/build_adodown_site.yaml
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

Expand All @@ -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:
Expand All @@ -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")
Expand All @@ -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

0 comments on commit 6631607

Please sign in to comment.