Production site #596
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
name: Production site | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
schedule: | |
- cron: '0 0 * * SUN' # Run on sundays | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref }} | |
cancel-in-progress: true | |
jobs: | |
deploy: | |
name: Build & Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
with: | |
submodules: true # Fetch Hugo themes (true OR recursive) | |
fetch-depth: 0 # Fetch all history for .GitInfo and .Lastmod | |
- name: Setup Hugo | |
uses: peaceiris/actions-hugo@v2 | |
with: | |
hugo-version: '0.111.3' | |
extended: true | |
- run: | | |
sudo apt-get update | |
sudo apt-get install -y libcurl4-openssl-dev --fix-missing | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: '4.3.0' | |
- uses: r-lib/actions/setup-renv@v2 | |
- name: Get publications | |
run: Rscript scripts/get_pubs.R | |
- name: Build 🔧 | |
env: | |
HUGO_GMAP_API: ${{ secrets.HUGO_GMAP_API }} | |
run: hugo --minify | |
- name: Deploy 🚀 | |
uses: JamesIves/github-pages-deploy-action@v4 | |
with: | |
branch: gh-pages # The branch the action should deploy to. | |
folder: public # The folder the action should deploy. |