Skip to content

Commit

Permalink
Merge branch 'develop'
Browse files Browse the repository at this point in the history
  • Loading branch information
SamTV12345 committed Apr 10, 2024
2 parents 4631e14 + 43d57e3 commit a5f4d3e
Show file tree
Hide file tree
Showing 114 changed files with 8,007 additions and 1,498 deletions.
6 changes: 5 additions & 1 deletion .github/dependabot.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,11 @@ updates:
schedule:
interval: "daily"
- package-ecosystem: "npm"
directory: "/src"
directory: "/"
schedule:
interval: "daily"
versioning-strategy: "increase"
open-pull-requests-limit: 30
groups:
dev-dependencies:
dependency-type: "development"
8 changes: 7 additions & 1 deletion .github/workflows/backend-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: "Backend tests"

# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
on:
push:
paths-ignore:
- "doc/**"
pull_request:
paths-ignore:
- "doc/**"

permissions:
contents: read
Expand Down
70 changes: 70 additions & 0 deletions .github/workflows/build-and-deploy-docs.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,70 @@
# Workflow for deploying static content to GitHub Pages
name: Deploy Docs to GitHub Pages

on:
# Runs on pushes targeting the default branch
push:
branches: ["develop"]
paths:
- doc/** # Only run workflow when changes are made to the doc directory
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:

# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
packages: read

# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false

jobs:
# Single deploy job since we're just deploying
deploy:
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v5
- uses: pnpm/action-setup@v3
name: Install pnpm
with:
version: 8
run_install: false
- name: Get pnpm store directory
shell: bash
run: |
echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV
- uses: actions/cache@v4
name: Setup pnpm cache
with:
path: ${{ env.STORE_PATH }}
key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
${{ runner.os }}-pnpm-store-
- name: Only install direct dependencies
run: pnpm config set auto-install-peers false
- name: Install dependencies
run: pnpm install
- name: Build app
working-directory: doc
run: pnpm run docs:build
env:
COMMIT_REF: ${{ github.sha }}
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './doc/.vitepress/dist'
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
2 changes: 2 additions & 0 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,8 @@ on:
pull_request:
# The branches below must be a subset of the branches above
branches: [develop]
paths-ignore:
- 'doc/**'
schedule:
- cron: '0 13 * * 1'

Expand Down
4 changes: 4 additions & 0 deletions .github/workflows/docker.yml
Original file line number Diff line number Diff line change
@@ -1,9 +1,13 @@
name: Docker
on:
pull_request:
paths-ignore:
- 'doc/**'
push:
branches:
- 'develop'
paths-ignore:
- 'doc/**'
tags:
- 'v?[0-9]+.[0-9]+.[0-9]+'
env:
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/frontend-admin-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Leave the powered by Sauce Labs bit in as this means we get additional concurrency
name: "Frontend admin tests powered by Sauce Labs"

on: [push]
on:
push:
paths-ignore:
- 'doc/**'

permissions:
contents: read # to fetch code (actions/checkout)
Expand Down
5 changes: 4 additions & 1 deletion .github/workflows/frontend-tests.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,10 @@
# Leave the powered by Sauce Labs bit in as this means we get additional concurrency
name: "Frontend tests powered by Sauce Labs"

on: [push]
on:
push:
paths-ignore:
- 'doc/**'

permissions:
contents: read # to fetch code (actions/checkout)
Expand Down
34 changes: 0 additions & 34 deletions .github/workflows/lint-package-lock.yml

This file was deleted.

8 changes: 7 additions & 1 deletion .github/workflows/load-test.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: "Loadtest"

# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
on:
push:
paths-ignore:
- "doc/**"
pull_request:
paths-ignore:
- "doc/**"

permissions:
contents: read
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/perform-type-check.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: "Perform type checks"

# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
on:
push:
paths-ignore:
- "doc/**"
pull_request:
paths-ignore:
- "doc/**"

permissions:
contents: read
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/rate-limit.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: "rate limit"

# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
on:
push:
paths-ignore:
- "doc/**"
pull_request:
paths-ignore:
- "doc/**"

permissions:
contents: read
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/upgrade-from-latest-release.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: "Upgrade from latest release"

# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
on:
push:
paths-ignore:
- "doc/**"
pull_request:
paths-ignore:
- "doc/**"

permissions:
contents: read
Expand Down
8 changes: 7 additions & 1 deletion .github/workflows/windows.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,13 @@
name: "Windows Build"

# any branch is useful for testing before a PR is submitted
on: [push, pull_request]
on:
push:
paths-ignore:
- "doc/**"
pull_request:
paths-ignore:
- "doc/**"

permissions:
contents: read
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,3 +27,4 @@ plugin_packages
/src/test-results
playwright-report
state.json
/src/static/oidc
12 changes: 12 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,15 @@
# 2.0.2

### Notable enhancements and fixes

- Fixed the locale loading in the admin panel
- Added OAuth2.0 support for the Etherpad API. You can now log in into the Etherpad API with your admin user using OAuth2

### Compatibility changes

- The tests now require generating a token from the OAuth secret. You can find the `generateJWTToken` in the common.ts script for plugin endpoint updates.


# 2.0.1

### Notable enhancements and fixes
Expand Down
30 changes: 23 additions & 7 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -7,8 +7,9 @@
FROM node:alpine as adminBuild

WORKDIR /opt/etherpad-lite
COPY ./admin ./admin
COPY ./ ./
RUN cd ./admin && npm install -g pnpm && pnpm install && pnpm run build --outDir ./dist
RUN cd ./ui && pnpm install && pnpm run build --outDir ./dist


FROM node:alpine as build
Expand Down Expand Up @@ -40,6 +41,14 @@ ARG SETTINGS=./settings.json.docker
# ETHERPAD_PLUGINS="ep_codepad ep_author_neat"
ARG ETHERPAD_PLUGINS=

# local plugins to install while building the container. By default no plugins are
# installed.
# If given a value, it has to be a space-separated, quoted list of plugin names.
#
# EXAMPLE:
# ETHERPAD_LOCAL_PLUGINS="../ep_my_plugin ../ep_another_plugin"
ARG ETHERPAD_LOCAL_PLUGINS=

# Control whether abiword will be installed, enabling exports to DOC/PDF/ODT formats.
# By default, it is not installed.
# If given any value, abiword will be installed.
Expand All @@ -57,7 +66,7 @@ ARG INSTALL_ABIWORD=
ARG INSTALL_SOFFICE=

# Install dependencies required for modifying access.
RUN apk add shadow bash
RUN apk add --no-cache shadow bash
# Follow the principle of least privilege: run as unprivileged user.
#
# Running as non-root enables running this image in platforms like OpenShift
Expand All @@ -84,7 +93,7 @@ RUN \
mkdir -p /usr/share/man/man1 && \
npm install pnpm -g && \
apk update && apk upgrade && \
apk add \
apk add --no-cache \
ca-certificates \
curl \
git \
Expand All @@ -105,11 +114,15 @@ COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./

FROM build as development

COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/pnpm-lock.yaml ./src/
COPY --chown=etherpad:etherpad ./src/package.json .npmrc ./src/
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/ui/dist ./src/static/oidc

RUN bin/installDeps.sh && \
{ [ -z "${ETHERPAD_PLUGINS}" ] || pnpm run install-plugins ${ETHERPAD_PLUGINS}; }
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \
pnpm run install-plugins ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}}; \
fi


FROM build as production

Expand All @@ -118,9 +131,12 @@ ENV ETHERPAD_PRODUCTION=true

COPY --chown=etherpad:etherpad ./src ./src
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/admin/dist ./src/templates/admin
COPY --chown=etherpad:etherpad --from=adminBuild /opt/etherpad-lite/ui/dist ./src/static/oidc

RUN bin/installDeps.sh && rm -rf ~/.npm && \
{ [ -z "${ETHERPAD_PLUGINS}" ] || pnpm run install-plugins ${ETHERPAD_PLUGINS}; }
RUN bin/installDeps.sh && rm -rf ~/.npm && rm -rf ~/.local && rm -rf ~/.cache && \
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \
pnpm run install-plugins ${ETHERPAD_PLUGINS} ${ETHERPAD_LOCAL_PLUGINS:+--path ${ETHERPAD_LOCAL_PLUGINS}}; \
fi


# Copy the configuration file.
Expand Down
9 changes: 4 additions & 5 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Etherpad: A real-time collaborative editor for the web

![Demo Etherpad Animated Jif](doc/images/etherpad_demo.gif "Etherpad in action")
![Demo Etherpad Animated Jif](doc/public/etherpad_demo.gif "Etherpad in action")

## About

Expand All @@ -21,7 +21,6 @@ We're looking for maintainers and have some funding available. Please contact J
### Code Quality

[![Code Quality](https://github.com/ether/etherpad-lite/actions/workflows/codeql-analysis.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/codeql-analysis.yml)
[![package.lock](https://github.com/ether/etherpad-lite/actions/workflows/lint-package-lock.yml/badge.svg?color=%2344b492)](https://github.com/ether/etherpad-lite/actions/workflows/lint-package-lock.yml)

### Testing

Expand Down Expand Up @@ -121,9 +120,9 @@ Find [here](doc/docker.adoc) information on running Etherpad in a container.

Etherpad is very customizable through plugins.

![Basic install](doc/images/etherpad_basic.png "Basic Installation")
![Basic install](doc/public/etherpad_basic.png "Basic Installation")

![Full Features](doc/images/etherpad_full_features.png "You can add a lot of plugins !")
![Full Features](doc/public/etherpad_full_features.png "You can add a lot of plugins !")

### Available Plugins

Expand Down Expand Up @@ -211,7 +210,7 @@ edit `settings.json` and restart Etherpad each time.
Open http://127.0.0.1:9001/p/test#skinvariantsbuilder in your browser and start
playing!

![Skin Variant](doc/images/etherpad_skin_variants.gif "Skin variants")
![Skin Variant](doc/public/etherpad_skin_variants.gif "Skin variants")

## Helpful resources

Expand Down
Loading

0 comments on commit a5f4d3e

Please sign in to comment.