forked from ether/etherpad-lite
-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
91 changed files
with
14,083 additions
and
13,157 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -25,3 +25,5 @@ Dockerfile | |
settings.json | ||
src/node_modules | ||
admin/node_modules | ||
ui/node_modules | ||
node_modules |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -61,111 +61,30 @@ jobs: | |
name: Run the backend tests | ||
shell: msys2 {0} | ||
run: cd src && pnpm test | ||
- | ||
name: Build the .zip | ||
shell: msys2 {0} | ||
run: bin/buildForWindows.sh | ||
- | ||
name: Archive production artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: etherpad-win.zip | ||
path: etherpad-win.zip | ||
|
||
build-exe: | ||
if: | | ||
(github.event_name != 'pull_request') | ||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id) | ||
name: Build .exe | ||
needs: build-zip | ||
runs-on: windows-latest | ||
steps: | ||
- | ||
name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- | ||
name: Download .zip | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: etherpad-win.zip | ||
path: .. | ||
- | ||
name: Extract .zip | ||
working-directory: .. | ||
run: 7z x etherpad-win.zip -oetherpad-zip | ||
- | ||
name: Create installer | ||
uses: joncloud/[email protected] | ||
with: | ||
script-file: 'bin/nsis/etherpad.nsi' | ||
- | ||
name: Archive production artifacts | ||
uses: actions/upload-artifact@v4 | ||
with: | ||
name: etherpad-win.exe | ||
path: etherpad-win.exe | ||
|
||
deploy-zip: | ||
# run on pushes to any branch | ||
# run on PRs from external forks | ||
permissions: | ||
contents: write | ||
if: | | ||
(github.event_name != 'pull_request') | ||
|| (github.event.pull_request.head.repo.id != github.event.pull_request.base.repo.id) | ||
name: Deploy | ||
needs: build-zip | ||
runs-on: windows-latest | ||
steps: | ||
- | ||
name: Download zip | ||
uses: actions/download-artifact@v4 | ||
with: | ||
name: etherpad-win.zip | ||
- | ||
name: Extract Etherpad | ||
run: 7z x etherpad-win.zip -oetherpad | ||
- | ||
uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
- uses: pnpm/action-setup@v4 | ||
name: Install pnpm | ||
with: | ||
version: 9.0.4 | ||
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 all dependencies and symlink for ep_etherpad-lite | ||
run: .\bin\installOnWindows.bat | ||
working-directory: etherpad | ||
- | ||
name: Run Etherpad | ||
working-directory: etherpad/src | ||
run: | | ||
pnpm install cypress | ||
.\node_modules\.bin\cypress.cmd install --force | ||
pnpm i | ||
pnpm exec playwright install --with-deps | ||
pnpm run prod & | ||
curl --connect-timeout 10 --max-time 20 --retry 5 --retry-delay 10 --retry-max-time 60 --retry-connrefused http://127.0.0.1:9001/p/test | ||
pnpm exec cypress run --config-file ./tests/frontend/cypress/cypress.config.js | ||
# On release, upload windows zip to GitHub release tab | ||
pnpm exec playwright install chromium --with-deps | ||
pnpm run test-ui --project=chromium | ||
# On release, create release | ||
- | ||
name: Rename to etherpad-lite-win.zip | ||
shell: powershell | ||
run: mv etherpad-win.zip etherpad-lite-win.zip | ||
- name: upload binaries to release | ||
- name: Generate Changelog | ||
if: ${{startsWith(github.ref, 'refs/tags/v') }} | ||
working-directory: bin | ||
run: pnpm run generateChangelog ${{ github.ref }} > ${{ github.workspace }}-CHANGELOG.txt | ||
with: | ||
tag: ${{ github.ref }} | ||
- name: Release | ||
uses: softprops/action-gh-release@v2 | ||
if: ${{startsWith(github.ref, 'refs/tags/v') }} | ||
with: | ||
files: etherpad-lite-win.zip | ||
body_path: ${{ github.workspace }}-CHANGELOG.txt | ||
make_latest: true |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,11 +5,11 @@ | |
# Author: muxator | ||
|
||
FROM node:alpine AS adminbuild | ||
|
||
RUN npm install -g [email protected] | ||
WORKDIR /opt/etherpad-lite | ||
COPY ./ ./ | ||
RUN cd ./admin && npm install -g pnpm@9.0.4 && pnpm install && pnpm run build --outDir ./dist | ||
RUN cd ./ui && pnpm install && pnpm run build --outDir ./dist | ||
COPY . . | ||
RUN pnpm install | ||
RUN pnpm run build:ui | ||
|
||
|
||
FROM node:alpine AS build | ||
|
@@ -115,8 +115,8 @@ COPY --chown=etherpad:etherpad ./pnpm-workspace.yaml ./package.json ./ | |
FROM build AS development | ||
|
||
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 | ||
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/ templates/admin./src/templates/admin | ||
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/static/oidc ./src/static/oidc | ||
|
||
RUN bin/installDeps.sh && \ | ||
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \ | ||
|
@@ -130,8 +130,8 @@ ENV NODE_ENV=production | |
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 | ||
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/templates/admin ./src/templates/admin | ||
COPY --chown=etherpad:etherpad --from=adminbuild /opt/etherpad-lite/src/static/oidc ./src/static/oidc | ||
|
||
RUN bin/installDeps.sh && rm -rf ~/.npm && rm -rf ~/.local && rm -rf ~/.cache && \ | ||
if [ ! -z "${ETHERPAD_PLUGINS}" ] || [ ! -z "${ETHERPAD_LOCAL_PLUGINS}" ]; then \ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.