Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
73 changes: 73 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: Build and Deploy

on:
push:
branches:
- main
paths:
- "docs/**"
- _quarto.yml
- docusaurus.config.js
- sidebars.js
pull_request:
paths:
- .github/workflows/main.yml
- "docs/**"
- _quarto.yml
- docusaurus.config.js
- sidebars.js
workflow_dispatch:

concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3

- uses: actions/setup-node@v3
with:
node-version: 18
cache: npm

- run: npm install

- uses: actions/setup-python@v4
with:
python-version: "3.11"
cache: pip

- run: python3 -m pip install jupyter jupyter-cache -r requirements.txt

- uses: r-lib/actions/setup-r@v2

- uses: r-lib/actions/setup-renv@v2

- uses: quarto-dev/quarto-actions/setup@v2
with:
version: pre-release

- name: build
run: |
quarto render
npm run build

- name: Upload artifact
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
with:
name: build
path: build

- 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: ./build
cname: rocker-project.org