Skip to content

Commit

Permalink
Merge pull request #40 from harvard-edge/iss38_ci_page
Browse files Browse the repository at this point in the history
Add Github actions
  • Loading branch information
Naeemkh authored Oct 22, 2023
2 parents 7f6ecef + 87e7f20 commit 1efd37f
Show file tree
Hide file tree
Showing 2 changed files with 44 additions and 0 deletions.
24 changes: 24 additions & 0 deletions .github/workflows/build_pages.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
name: Check for build

on:
pull_request:
branches:
- main

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Build
run: quarto render
- name: Upload artifact
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
with:
name: _book
path: _book


20 changes: 20 additions & 0 deletions .github/workflows/deploy_page.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
name: Deploy page
on:
workflow_dispatch:

jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Build
run: quarto render

- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main' }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./_book

0 comments on commit 1efd37f

Please sign in to comment.