Merge pull request #7 from BU-Spark/sched #10
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: Quarto Publish | |
# Controls when the workflow will run | |
on: | |
# Triggers the workflow on push only for the "main" branch | |
push: | |
branches: [ "main" ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# A workflow run is made up of one or more jobs that can run sequentially or in parallel | |
jobs: | |
# Setup environment, render quarto and upload GH pages artifact | |
build-upload: | |
# The type of runner that the job will run on | |
runs-on: ubuntu-latest | |
permissions: | |
contents: write | |
# Steps represent a sequence of tasks that will be executed as part of the job | |
steps: | |
# Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it | |
- name: Check out repository | |
uses: actions/checkout@v4 | |
with: | |
lfs: true | |
# Downloads and installs the OS specific version of Quarto | |
- name: Set up Quarto | |
uses: quarto-dev/quarto-actions/setup@v2 | |
- name: Check Quarto version | |
shell: sh | |
run: | | |
echo "Checking Quarto version" | |
quarto --version | |
- name: Setup GraphViz CLI | |
uses: ts-graphviz/setup-graphviz@v2 | |
- name: Check GraphViz dot version | |
shell: sh | |
run: | | |
echo "Checking dot version" | |
dot -V | |
- name: Install Python and Dependencies | |
uses: actions/setup-python@v4 | |
with: | |
python-version: '3.12' | |
cache: 'pip' | |
- run: pip install jupyter | |
- run: pip install -r requirements.txt | |
- run: pip list | |
- name: Render Quarto Project | |
uses: quarto-dev/quarto-actions/render@v2 | |
env: | |
QUARTO_DENO_V8_OPTIONS: --stack-size=8192 | |
OPENAI_API_KEY: ${{ secrets.OPENAI_API_KEY }} | |
LANGCHAIN_API_KEY: ${{ secrets.LANGCHAIN_API_KEY }} | |
- name: Upload GitHub Pages artifact | |
uses: actions/upload-pages-artifact@v3 | |
with: | |
path: ./_site | |
# - name: Render and Publish | |
# uses: quarto-dev/quarto-actions/publish@v2 | |
# with: | |
# path: ./ds701_book | |
# target: gh-pages | |
# env: | |
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
# Deploy pages | |
deploy: | |
# Add a dependecy to the build job | |
needs: build-upload | |
# Grant GITHUB_TOKEN the permissions required to make a Pages deployment | |
permissions: | |
pages: write # to deploy to Pages | |
id-token: write # to verify the deployment originates from an appropriate source | |
# Deploy to the github-pages environment | |
environment: | |
name: github-pages | |
url: ${{ steps.deployment.outputs.page_url }} | |
# Specify runner + deployment step | |
runs-on: ubuntu-latest | |
steps: | |
- name: Deploy to GitHub Pages | |
id: deployment | |
uses: actions/deploy-pages@v4 # or specific "vX.X.X" version tag for this action |