Skip to content

Commit

Permalink
Pipeline Quarto & Pages 🚀 (#365)
Browse files Browse the repository at this point in the history
* initialisation quarto

* Cards

* navigation

* modern datascience

* Homepage

* prepare build

* quarto

* Automated changes

* Automated changes

* Automated changes

* Automated changes

* Automated changes

* Automated changes

* github action

* Automated changes

* Automated changes

* GHA email

* Automated changes

* Automated changes

* intro

* Automated changes

* Automated changes

* python introduction

* change link

* utils

* test eval true

* eval false webscraping

* remove index

* restore file

* Automated changes

* Automated changes

* eval false

* Automated changes

* Automated changes

* retour README

* Automated changes

* Automated changes

* eval false elastic

* Automated changes

* Automated changes

* featured manipulation

* Automated changes

* Automated changes

* featued false

* Automated changes

* Automated changes

* harmonise

* NLP

* Automated changes

* Automated changes

* rm

* css styling

* quarto

* Automated changes

* Automated changes

* css

* Automated changes

* theme

* Automated changes

* Automated changes

* custom css

* Automated changes

* Automated changes

* tweak project

* Force website project when using notebooks

* hack names

* tweak project

* remove old file

* featured

* Automated changes

---------

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
  • Loading branch information
linogaliana and github-actions[bot] committed Jul 2, 2023
1 parent f2e8922 commit f21a24d
Show file tree
Hide file tree
Showing 70 changed files with 1,204 additions and 2,232 deletions.
20 changes: 0 additions & 20 deletions .editorconfig

This file was deleted.

35 changes: 10 additions & 25 deletions .github/workflows/netlify-test.yaml
Expand Up @@ -6,16 +6,16 @@ on:
- main
- master
- dev
- quarto

jobs:
blogdown:
pages:
name: Render-Blog
runs-on: ubuntu-latest
container: linogaliana/python-datascientist:latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand All @@ -25,35 +25,18 @@ jobs:
run: |
conda info
conda list
- name: Build to md
- name: Render website
run: |
git diff --name-only origin/master origin/${GITHUB_HEAD_REF} >> diff
python build/tweak_render.py
quarto render --to hugo
mv content/course/index.md content/course/_index.md
mv content/course/manipulation/index.md content/course/manipulation/_index.md
mv content/course/visualisation/index.md content/course/visualisation/_index.md
mv content/course/modelisation/index.md content/course/modelisation/_index.md
quarto render --to html
python build/wc_website.py
python build/tweak_markdown.py
hugo
- name: Install npm
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Deploy to Netlify
if: ${{ github.event.pull_request.head.repo.full_name == github.repository }}
# NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID added in the repo's secrets
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
BRANCHE_REF: ${{ github.event.pull_request.head.ref }}
- name: Publish to Pages
run: |
npm init -y
npm install --unsafe-perm=true netlify-cli -g
netlify init
netlify deploy --alias=${BRANCHE_REF} --dir="public" --message "Preview deploy from ${BRANCHE_REF}"
git config --global user.email quarto-github-actions-publish@example.com
git config --global user.name "Quarto GHA Workflow Runner"
quarto publish gh-pages . --no-render --no-browser
- uses: actions/upload-artifact@v2
with:
name: Content
Expand Down Expand Up @@ -82,6 +65,7 @@ jobs:
- name: Convert in ipynb with Quarto
run: |
git diff --name-only origin/master origin/${GITHUB_HEAD_REF} >> diff
python build/tweak_project.py
python build/tweak_render.py
python build/pimp_notebook.py
quarto render content --to ipynb
Expand Down Expand Up @@ -130,6 +114,7 @@ jobs:
- name: Convert in ipynb with Quarto
run: |
git diff --name-only origin/master origin/${GITHUB_HEAD_REF} >> diff
python build/tweak_project.py
python build/tweak_render.py
python build/tweak_options_quarto.py
python build/pimp_notebook.py
Expand Down
38 changes: 12 additions & 26 deletions .github/workflows/prod.yml
@@ -1,4 +1,4 @@
name: Docker Build and Website Deploy
name: Production deployment

on:
push:
Expand All @@ -7,14 +7,13 @@ on:
- master

jobs:
blogdown:
pages:
name: Render-Blog
runs-on: ubuntu-latest
container: linogaliana/python-datascientist:latest
steps:
- uses: actions/checkout@v2
with:
submodules: true
fetch-depth: 0
ref: ${{ github.event.pull_request.head.ref }}
repository: ${{github.event.pull_request.head.repo.full_name}}
Expand All @@ -24,32 +23,19 @@ jobs:
run: |
conda info
conda list
- name: Build to md
- name: Render website
run: |
quarto render --to hugo
mv content/course/manipulation/index.md content/course/manipulation/_index.md
mv content/course/visualisation/index.md content/course/visualisation/_index.md
mv content/course/modelisation/index.md content/course/modelisation/_index.md
mv content/course/index.md content/course/_index.md
git diff --name-only origin/master origin/${GITHUB_HEAD_REF} >> diff
python build/tweak_render.py
quarto render --to html
python build/wc_website.py
python build/tweak_markdown.py
hugo
- name: Install npm
uses: actions/setup-node@v2
with:
node-version: '14'
- name: Deploy to Netlify
# NETLIFY_AUTH_TOKEN and NETLIFY_SITE_ID added in the repo's secrets
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
BRANCHE_REF: ${{ github.event.pull_request.head.ref }}
- name: Publish to Pages
run: |
npm init -y
npm install --unsafe-perm=true netlify-cli -g
netlify init
netlify deploy --prod --dir="public" --message "Deploy master"
- uses: actions/upload-artifact@v1
git config --global user.email quarto-github-actions-publish@example.com
git config --global user.name "Quarto GHA Workflow Runner"
quarto publish gh-pages . --no-render --no-browser
- uses: actions/upload-artifact@v2
with:
name: public
name: Website
path: public/
5 changes: 5 additions & 0 deletions .gitignore
@@ -1,3 +1,8 @@
/.quarto/
_book/
_site/
*index.ipynb
*.parquet
# Created by https://www.toptal.com/developers/gitignore/api/pycharm,venv
# Edit at https://www.toptal.com/developers/gitignore?templates=pycharm,venv

Expand Down
Empty file removed .gitmodules
Empty file.
101 changes: 95 additions & 6 deletions _quarto.yml
@@ -1,22 +1,111 @@
project:
title: "python-datascientist"
type: book
pre-render: utils.py
render:
- index.qmd
- content/**/*.qmd
- content/**/**/*.qmd
- content/**/**/**/*.qmd
- "!content/slides/intro/index.qmd"

book:
title: "Python pour la data science"
navbar:
background: "white"
left:
- href: index.qmd
text: Home
- href: content/course/getting-started/index.qmd
text: Introduction
- href: content/course/manipulation/index.qmd
text: Manipuler des données
- href: content/course/visualisation/index.qmd
text: Visualiser des données
- href: content/course/modelisation/index.qmd
text: Modéliser
- href: content/course/NLP/index.qmd
text: NLP
- href: content/course/modern-ds/index.qmd
text: Appronfondissements
- href: content/course/git/index.qmd
text: Git {{< fa brands git-alt >}}
tools:
- icon: github
menu:
- text: Code source
url: https://github.com/linogaliana/python-datascientist

chapters:
- href: index.qmd
text: "Homepage"
- part: "content/course/getting-started/index.qmd"
chapters:
- content/course/getting-started/01_installation/index.qmd
- content/course/getting-started/02_DS_environment/index.qmd
- content/course/getting-started/03_data_analysis/index.qmd
- content/course/getting-started/04_python_practice/index.qmd
- content/course/getting-started/05_rappels_types/index.qmd
- content/course/getting-started/06_rappels_fonctions/index.qmd
- content/course/getting-started/07_rappels_classes/index.qmd
- part: content/course/manipulation/index.qmd
chapters:
- content/course/manipulation/01_numpy/index.qmd
- content/course/manipulation/02a_pandas_tutorial/index.qmd
- content/course/manipulation/02b_pandas_TP/index.qmd
- content/course/manipulation/03_geopandas_tutorial/index.qmd
- content/course/manipulation/03_geopandas_TP/index.qmd
- content/course/manipulation/04a_webscraping_TP/index.qmd
- content/course/manipulation/04c_API_TP/index.qmd
- content/course/manipulation/04b_regex_TP/index.qmd
- content/course/manipulation/07_dask/index.qmd
- content/course/manipulation/06a_exo_supp_webscraping/index.qmd
- part: content/course/visualisation/index.qmd
chapters:
- content/course/visualisation/matplotlib/index.qmd
- content/course/visualisation/maps/index.qmd
- part: content/course/modelisation/index.qmd
chapters:
- content/course/modelisation/0_preprocessing/index.qmd
- content/course/modelisation/1_modelevaluation/index.qmd
- content/course/modelisation/2_SVM/index.qmd
- content/course/modelisation/3_regression/index.qmd
- content/course/modelisation/4_featureselection/index.qmd
- content/course/modelisation/5_clustering/index.qmd
- content/course/modelisation/6_pipeline/index.qmd
- part: content/course/NLP/index.qmd
chapters:
- content/course/NLP/01_intro/index.qmd
- content/course/NLP/02_exoclean/index.qmd
- content/course/NLP/03_lda/index.qmd
- content/course/NLP/04_word2vec/index.qmd
- content/course/NLP/05_exo_supp/index.qmd
- part: content/course/modern-ds/index.qmd
chapters:
- content/course/modern-ds/continuous_integration/index.qmd
- content/course/modern-ds/dallE/index.qmd
- content/course/modern-ds/s3/index.qmd
- content/course/modern-ds/elastic_approfondissement/index.qmd
- content/course/modern-ds/elastic_intro/index.qmd


format:
html:
theme:
- cosmo
- custom.scss
css: styles.css
toc: true
ipynb: default



validate-yaml: false
jupyter: python3

wrap: preserve
keep-ipynb: true
#cache: true

format:
hugo:
html-math-method:
method: mathjax
ipynb: default

#bibliography: references.bib

Expand Down
5 changes: 5 additions & 0 deletions about.qmd
@@ -0,0 +1,5 @@
---
title: "About"
---

About this site
85 changes: 0 additions & 85 deletions assets/css/libs/chroma/monokai.css

This file was deleted.

0 comments on commit f21a24d

Please sign in to comment.