forked from pharmaverse/pharmaverse
-
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 branch 'test-staging' into develop
- Loading branch information
Showing
1 changed file
with
10 additions
and
13 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,7 +3,7 @@ name: github pages | |
on: | ||
push: | ||
branches: | ||
- main # Set a branch to deploy | ||
- main | ||
- develop | ||
schedule: | ||
- cron: 0 13 * * 1 # At 13:00 on Monday | ||
|
@@ -16,28 +16,25 @@ jobs: | |
steps: | ||
- uses: actions/[email protected] | ||
with: | ||
submodules: true # Fetch Hugo themes (true OR recursive) | ||
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | ||
|
||
submodules: true | ||
fetch-depth: 0 | ||
- name: Install curl | ||
run: sudo apt update && sudo apt-get install -y libcurl4-openssl-dev | ||
|
||
- name: Setup R | ||
uses: r-lib/actions/setup-r@v2 | ||
with: | ||
r-version: '4.2.0' | ||
r-version: "4.2.0" | ||
|
||
- name: Setup renv | ||
uses: r-lib/actions/setup-renv@v2 | ||
with: | ||
cache-version: 2 | ||
|
||
# Run R code | ||
# Rscript scripts/add_contributions.R disabled | ||
- name: Run scripts | ||
run: | | ||
Rscript scripts/add_badges.R | ||
# Rscript scripts/add_contributions.R disabled | ||
env: | ||
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
|
@@ -51,10 +48,10 @@ jobs: | |
- name: Setup Hugo | ||
uses: peaceiris/actions-hugo@v3 | ||
with: | ||
hugo-version: '0.119.0' | ||
hugo-version: "0.119.0" | ||
extended: true | ||
|
||
# IF main | ||
# main branch | ||
- name: Build | ||
if: ${{ github.ref == 'refs/heads/main' }} | ||
run: hugo --minify | ||
|
@@ -66,7 +63,7 @@ jobs: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
publish_dir: ./public | ||
|
||
# IF develop | ||
# develop branch | ||
- name: Build | ||
if: ${{ github.ref == 'refs/heads/develop' }} | ||
run: hugo -e staging | ||
|
@@ -75,7 +72,7 @@ jobs: | |
uses: netlify/actions/cli@master | ||
if: ${{ github.ref == 'refs/heads/develop' }} | ||
with: | ||
args: deploy --dir=public --prod # Update 'dist' to your build output folder | ||
args: deploy --dir=public --prod | ||
env: | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} # Store this in GitHub secrets | ||
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} | ||
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} |