Skip to content

Commit

Permalink
Merge branch 'dev' into connexion_6367
Browse files Browse the repository at this point in the history
  • Loading branch information
philippemilink authored Apr 2, 2023
2 parents 8769023 + 2c74802 commit 1939b1a
Show file tree
Hide file tree
Showing 8 changed files with 64 additions and 52 deletions.
83 changes: 46 additions & 37 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
@@ -1,6 +1,10 @@
name: CI

on: ["push", "pull_request"]
on:
push:
pull_request:
schedule:
- cron: "30 3 * * WED" # every Wednesday at 3:30 AM, only main branch

env:
NODE_VERSION: "16" # needs to be also updated in .nvmrc
Expand All @@ -24,12 +28,15 @@ jobs:
name: Lint back-end
runs-on: ubuntu-22.04

# do not execute scheduled jobs on forks:
if: ${{ github.event_name != 'schedule' || github.repository_owner == 'zestedesavoir' }}

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "${{ env.PYTHON_VERSION }}"

Expand All @@ -44,12 +51,15 @@ jobs:
name: Build Sphinx documentation
runs-on: ubuntu-22.04

# do not execute scheduled jobs on forks:
if: ${{ github.event_name != 'schedule' || github.repository_owner == 'zestedesavoir' }}

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "${{ env.PYTHON_VERSION }}"

Expand All @@ -58,10 +68,10 @@ jobs:

- name: Retrieve pip cache directory
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache pip packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements-dev.txt') }}
Expand All @@ -74,33 +84,34 @@ jobs:
- name: Build documentation
run: make generate-doc

- name: Upload documentation as an artifact
uses: actions/upload-artifact@v2
- name: Upload documentation as a page artifact
uses: actions/upload-pages-artifact@v1
with:
name: doc
path: doc/build/html
retention-days: 1

# Build the website front-end and upload built assets as an artifact.
build-front:
name: Lint and build front-end
runs-on: ubuntu-22.04

# do not execute scheduled jobs on forks:
if: ${{ github.event_name != 'schedule' || github.repository_owner == 'zestedesavoir' }}

steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Set up NodeJS ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE_VERSION }}"

- name: Retrieve yarn cache directory
id: yarn-cache-dir-path
run: echo "::set-output name=dir::$(yarn cache dir)"
run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT

- name: Cache Node modules
uses: actions/cache@v2
uses: actions/cache@v3
id: yarn-cache
with:
path: ${{ steps.yarn-cache-dir-path.outputs.dir }}
Expand All @@ -118,7 +129,7 @@ jobs:
run: make build-front

- name: Upload font-end assets for subsequent tests
uses: actions/upload-artifact@v2
uses: actions/upload-artifact@v3
with:
name: assets
path: dist
Expand Down Expand Up @@ -187,10 +198,10 @@ jobs:
tar -xzf geckodriver-v${{ env.GECKODRIVER_VERSION }}-linux64.tar.gz -C geckodriver
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v3

- name: Download previously built assets
uses: actions/download-artifact@v2
uses: actions/download-artifact@v3
with:
name: assets
path: dist
Expand All @@ -201,32 +212,31 @@ jobs:
- name: Retrieve pip cache directory
id: pip-cache
run: |
echo "::set-output name=dir::$(pip cache dir)"
run: echo "dir=$(pip cache dir)" >> $GITHUB_OUTPUT

- name: Cache pip packages
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: ${{ runner.os }}-pip-${{ hashFiles('requirements*.txt') }}
restore-keys: |
${{ runner.os }}-pip-
- name: Cache Node modules
uses: actions/cache@v2
uses: actions/cache@v3
with:
path: ~/.npm
key: ${{ runner.os }}-node-${{ hashFiles('zmd/package-lock.json') }}
restore-keys: |
${{ runner.os }}-node-
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "${{ env.PYTHON_VERSION }}"

- name: Set up NodeJS ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
uses: actions/setup-node@v3
with:
node-version: "${{ env.NODE_VERSION }}"

Expand Down Expand Up @@ -265,7 +275,7 @@ jobs:

steps:
- name: Set up Python ${{ env.PYTHON_VERSION }}
uses: actions/setup-python@v2
uses: actions/setup-python@v4
with:
python-version: "${{ env.PYTHON_VERSION }}"

Expand All @@ -284,17 +294,16 @@ jobs:
runs-on: ubuntu-22.04
if: "github.ref == 'refs/heads/dev'"

steps:
- name: Download previously built documentation
uses: actions/download-artifact@v2
with:
name: doc
path: doc/build/html
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

permissions:
contents: read
pages: write
id-token: write

steps:
- name: Deploy to GitHub Pages
uses: JamesIves/github-pages-deploy-action@3.7.1
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages
FOLDER: doc/build/html
CLEAN: true
id: deployment
uses: actions/deploy-pages@v2
2 changes: 1 addition & 1 deletion README.rst
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
|Build Status| |Coverage Status| |Licence GPL|

.. image:: https://github.com/zestedesavoir/zds-site/blob/36c6bbc50fdecd936768ef5a566d98f5d757fcbf/assets/images/logo-background.png
.. image:: https://raw.githubusercontent.com/zestedesavoir/zds-site/36c6bbc50fdecd936768ef5a566d98f5d757fcbf/assets/images/logo-background.png

Qu'est-ce que Zeste de Savoir ?
===============================
Expand Down
3 changes: 3 additions & 0 deletions assets/scss/components/_topic-list.scss
Original file line number Diff line number Diff line change
Expand Up @@ -256,6 +256,9 @@
display: block;
font-weight: normal;
margin-top: $length-2;
&.staff-only {
color: $color-staff-link;
}
}
}
.topic-infos + .topic-description {
Expand Down
15 changes: 10 additions & 5 deletions assets/scss/layout/_sidebar.scss
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,8 @@
}

h4 {
padding-top: $length-20;
padding-top: $length-16;
padding-bottom: $length-4;
font-size: $font-size-8;

a {
Expand All @@ -93,10 +94,16 @@
}
}

&.accordeon h4 {
&.accordeon h4,
&.summary h4 {
cursor: pointer;
}
border-bottom: $length-1 solid $grey-100;

&:hover, &:focus {
background: $color-sidebar-hover;
}
}

h4[data-num] {
position: relative;
padding-left: calc(5% + #{$length-24});
Expand Down Expand Up @@ -455,8 +462,6 @@
padding-bottom: $length-6;
padding-right: $length-16;

border-bottom: $length-1 solid $grey-000;

overflow: hidden;
text-overflow: ellipsis;
white-space: nowrap;
Expand Down
4 changes: 2 additions & 2 deletions doc/source/back-end.rst
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,12 @@
Le *back-end*
=============

Le terme *back-end* désigne la partie du code associée à Django et écrite en python. Le but du *back-end* est de récupérer, générer et combiner les différentes données du site afin de les envoyer au `font-end <front-end.html>`__.
Le terme *back-end* désigne la partie du code associée à Django et écrite en python. Le but du *back-end* est de récupérer, générer et combiner les différentes données du site afin de les envoyer au `front-end <front-end.html>`__.

Vous trouverez dans les liens ci-dessous une documentation spécifique à chacun d'entre eux. Vous pouvez également retrouver la `documentation technique des modules ici <back-end-code.html>`__.

.. toctree::
:maxdepth: 2
:glob:

back-end/*
back-end/*
2 changes: 1 addition & 1 deletion templates/forum/includes/forums.part.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@
<div class="topic navigable-elem">
<div class="topic-description">
<a href="{{ forum.get_absolute_url }}" class="navigable-link">
<h4 class="topic-title" itemprop="itemListElement">
<h4 class="topic-title{% if forum.has_group %} staff-only{% endif %}" itemprop="itemListElement">
{{ forum.title }}
</h4>
</a>
Expand Down
5 changes: 1 addition & 4 deletions templates/pages/eula.html
Original file line number Diff line number Diff line change
Expand Up @@ -181,10 +181,7 @@ <h4>6.2 Utilisation des données enregistrées</h4>
Toutes les données à caractère personnel transmises par les utilisateurs et membres du site sont recueillies dans le plus strict respect de la législation. Elles ont pour finalité une meilleure utilisation de {{ app.site.dns }} et sont donc utilisées par l’éditeur du site à cette fin.
</p>
<p>
Lors de son inscription, il est requis de l’utilisateur de fournir des informations le concernant. En particulier, l’adresse électronique pourra être utilisée par le site pour l’administration et la communication d’informations touchant l’ensemble des membres du site (par exemple : une modification importante de la structure du site, l’ajout de fonctionnalités, une modification des présentes conditions, les dernières publications du site (newsletter), etc.).
</p>
<p>
Le membre a le choix s’abonner ou non à la newsletter.
Lors de son inscription, il est requis de l’utilisateur de fournir des informations le concernant. En particulier, l’adresse électronique pourra être utilisée par le site pour l’administration et la communication d’informations touchant l’ensemble des membres du site (par exemple : une modification importante de la structure du site, l’ajout de fonctionnalités, une modification des présentes conditions, etc.).
</p>
<p>
Les données concernant les utilisateurs (membres ou non) du site peuvent être également utilisées à des fins statistiques destinées à mesurer la fréquentation du site.
Expand Down
2 changes: 0 additions & 2 deletions zds/settings/abstract_base/django.py
Original file line number Diff line number Diff line change
Expand Up @@ -182,8 +182,6 @@
# 'django.contrib.admindocs',
)

SITE_ID = 1

REST_FRAMEWORK = {
"DEFAULT_PAGINATION_CLASS": "zds.api.pagination.DefaultPagination",
"DEFAULT_SCHEMA_CLASS": "rest_framework.schemas.coreapi.AutoSchema",
Expand Down

0 comments on commit 1939b1a

Please sign in to comment.