Merge pull request #1 from NovoNordisk-OpenSource/feat/start-homepage #8
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
on: | |
workflow_dispatch: | |
push: | |
branches: main | |
pull_request: | |
branches: main | |
name: Quarto Build and Publish | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Install R | |
uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: 'renv' | |
- name: Install R Dependencies | |
uses: r-lib/actions/setup-renv@v2 | |
with: | |
cache-version: 1 | |
- name: Generate pages | |
run: Rscript RUNME.R | |
- name: Quarto Render | |
uses: quarto-dev/quarto-actions/render@v2 | |
- name: Upload static files as artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: _site/ | |
deploy: | |
needs: build | |
if: github.ref_name == 'main' | |
permissions: | |
pages: write | |
id-token: write | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 |