mirror of
https://github.com/Shadowfita/docmost.git
synced 2025-11-22 20:51:04 +10:00
Compare commits
4 Commits
NTLM-Auth
...
15eb997c92
| Author | SHA1 | Date | |
|---|---|---|---|
| 15eb997c92 | |||
| be0d97661a | |||
| 4e2b23c97e | |||
| dc3ce27762 |
47
.github/workflows/main.yml
vendored
Normal file
47
.github/workflows/main.yml
vendored
Normal file
@ -0,0 +1,47 @@
|
|||||||
|
name: Sync Merged-Downstream with Docmost Upstream Main
|
||||||
|
|
||||||
|
on:
|
||||||
|
schedule:
|
||||||
|
- cron: '0 0 * * *' # Run daily at midnight UTC
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
sync:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- name: Checkout repo
|
||||||
|
uses: actions/checkout@v2
|
||||||
|
with:
|
||||||
|
fetch-depth: 0 # Fetch all history to detect changes properly
|
||||||
|
|
||||||
|
- name: Set up git
|
||||||
|
run: |
|
||||||
|
git config --global user.name "Shadowfita"
|
||||||
|
git config --global user.email "www.ryan.palmer@hotmail.com"
|
||||||
|
|
||||||
|
- name: Fetch upstream
|
||||||
|
run: |
|
||||||
|
git remote add upstream https://github.com/docmost/docmost.git
|
||||||
|
git fetch upstream
|
||||||
|
|
||||||
|
- name: Check if upstream has changes
|
||||||
|
id: check_changes
|
||||||
|
run: |
|
||||||
|
UPSTREAM_DIFF=$(git diff --name-only upstream/main)
|
||||||
|
if [ -z "$UPSTREAM_DIFF" ]; then
|
||||||
|
echo "No changes in upstream main branch."
|
||||||
|
echo "::set-output name=changes::false"
|
||||||
|
else
|
||||||
|
echo "Changes detected in upstream main branch."
|
||||||
|
echo "::set-output name=changes::true"
|
||||||
|
fi
|
||||||
|
|
||||||
|
- name: Merge upstream/main into Merged-Downstream
|
||||||
|
if: steps.check_changes.outputs.changes == 'true'
|
||||||
|
run: |
|
||||||
|
git checkout Merged-Downstream
|
||||||
|
git merge upstream/main
|
||||||
|
|
||||||
|
- name: Push changes to Merged-Downstream
|
||||||
|
if: steps.check_changes.outputs.changes == 'true'
|
||||||
|
run: |
|
||||||
|
git push origin Merged-Downstream
|
||||||
@ -17,6 +17,7 @@ To get started with Docmost, please refer to our [documentation](https://docmost
|
|||||||
|
|
||||||
## Features
|
## Features
|
||||||
- Real-time collaboration
|
- Real-time collaboration
|
||||||
|
- Diagrams (Draw.io, Excalidraw and Mermaid)
|
||||||
- Spaces
|
- Spaces
|
||||||
- Permissions management
|
- Permissions management
|
||||||
- Groups
|
- Groups
|
||||||
@ -32,4 +33,4 @@ To get started with Docmost, please refer to our [documentation](https://docmost
|
|||||||
</p>
|
</p>
|
||||||
|
|
||||||
### Contributing
|
### Contributing
|
||||||
See the [development doc](https://docmost.com/docs/self-hosting/development)
|
See the [development documentation](https://docmost.com/docs/self-hosting/development)
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "client",
|
"name": "client",
|
||||||
"private": true,
|
"private": true,
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"dev": "vite",
|
"dev": "vite",
|
||||||
"build": "tsc && vite build",
|
"build": "tsc && vite build",
|
||||||
|
|||||||
@ -7,23 +7,27 @@ declare global {
|
|||||||
export function getAppUrl(): string {
|
export function getAppUrl(): string {
|
||||||
//let appUrl = window.CONFIG?.APP_URL || process.env.APP_URL;
|
//let appUrl = window.CONFIG?.APP_URL || process.env.APP_URL;
|
||||||
|
|
||||||
// if (import.meta.env.DEV) {
|
// if (import.meta.env.DEV) {
|
||||||
// return appUrl || "http://localhost:3000";
|
// return appUrl || "http://localhost:3000";
|
||||||
//}
|
//}
|
||||||
|
|
||||||
return `${window.location.protocol}//${window.location.host}`;
|
return `${window.location.protocol}//${window.location.host}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getBackendUrl(): string {
|
export function getBackendUrl(): string {
|
||||||
return getAppUrl() + "/api";
|
return getAppUrl() + '/api';
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getCollaborationUrl(): string {
|
export function getCollaborationUrl(): string {
|
||||||
const COLLAB_PATH = "/collab";
|
const COLLAB_PATH = '/collab';
|
||||||
const url = process.env.APP_URL || getAppUrl();
|
|
||||||
|
|
||||||
const wsProtocol = url.startsWith("https") ? "wss" : "ws";
|
let url = getAppUrl();
|
||||||
return `${wsProtocol}://${url.split("://")[1]}${COLLAB_PATH}`;
|
if (import.meta.env.DEV) {
|
||||||
|
url = process.env.APP_URL;
|
||||||
|
}
|
||||||
|
|
||||||
|
const wsProtocol = url.startsWith('https') ? 'wss' : 'ws';
|
||||||
|
return `${wsProtocol}://${url.split('://')[1]}${COLLAB_PATH}`;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getAvatarUrl(avatarUrl: string) {
|
export function getAvatarUrl(avatarUrl: string) {
|
||||||
@ -31,17 +35,17 @@ export function getAvatarUrl(avatarUrl: string) {
|
|||||||
return null;
|
return null;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (avatarUrl?.startsWith("http")) {
|
if (avatarUrl?.startsWith('http')) {
|
||||||
return avatarUrl;
|
return avatarUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
return getBackendUrl() + "/attachments/img/avatar/" + avatarUrl;
|
return getBackendUrl() + '/attachments/img/avatar/' + avatarUrl;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getSpaceUrl(spaceSlug: string) {
|
export function getSpaceUrl(spaceSlug: string) {
|
||||||
return "/s/" + spaceSlug;
|
return '/s/' + spaceSlug;
|
||||||
}
|
}
|
||||||
|
|
||||||
export function getFileUrl(src: string) {
|
export function getFileUrl(src: string) {
|
||||||
return src?.startsWith("/files/") ? getBackendUrl() + src : src;
|
return src?.startsWith('/files/') ? getBackendUrl() + src : src;
|
||||||
}
|
}
|
||||||
|
|||||||
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "server",
|
"name": "server",
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"description": "",
|
"description": "",
|
||||||
"author": "",
|
"author": "",
|
||||||
"private": true,
|
"private": true,
|
||||||
|
|||||||
@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"name": "docmost",
|
"name": "docmost",
|
||||||
"homepage": "https://docmost.com",
|
"homepage": "https://docmost.com",
|
||||||
"version": "0.3.0",
|
"version": "0.3.1",
|
||||||
"private": true,
|
"private": true,
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build": "nx run-many -t build",
|
"build": "nx run-many -t build",
|
||||||
|
|||||||
Reference in New Issue
Block a user