-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Develop #481
base: master
Are you sure you want to change the base?
Develop #481
Changes from 29 commits
e7a028a
1a9a353
2e4d1e0
671eec0
4925f61
27f5a6d
c7b08f7
8e86d6a
adbd690
a4b0145
1e6701c
3bb1d71
bb9b9e2
c6da626
f6d5221
7fc0e94
eb42bef
948c5d3
e11a6e6
026e589
d66402d
7ca722b
0edde7d
d07d6a7
8327a08
17e70cf
b6cc832
1fe0315
bf21af0
a2cf19d
9cec1e9
24578cf
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,7 +1,4 @@ | ||
CLIENT_ID= | ||
CLIENT_SECRET= | ||
|
||
RENDER_IMAGE=hugo_render | ||
VOLUME_DATA=/home//wikigdrive | ||
VOLUME_PREVIEW=/home//wikigdrive-preview | ||
DOMAIN=localhost | ||
DOMAIN=http://localhost:3000 | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -32,7 +32,7 @@ jobs: | |
|
||
build: | ||
needs: test | ||
runs-on: wgd-dev | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Create pull request | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,11 +2,13 @@ name: Pull request created | |
|
||
on: | ||
pull_request: | ||
branches: [ master ] | ||
types: [edited, synchronize] | ||
paths-ignore: | ||
- 'develop/**' | ||
|
||
jobs: | ||
test: | ||
if: github.event.pull_request.head.ref != 'develop' && contains( github.event.pull_request.labels.*.name, 'deploy-pr') | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why do we want to limit it? Does building/testing take too much time? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Wikigdrive starts watching each shared drive for changes. It seems that the more watchers we use the slower they work. Each additional instance is another set of connections to the API. |
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
|
@@ -31,70 +33,76 @@ jobs: | |
run: npm run test | ||
|
||
build: | ||
if: github.event.pull_request.head.ref != 'develop' && contains( github.event.pull_request.labels.*.name, 'deploy-pr') | ||
needs: test | ||
runs-on: wgd-dev | ||
|
||
steps: | ||
- name: Test | ||
run: echo "${{ github.event.number }}" | ||
|
||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: Build action runner | ||
run: docker build -t "wgd-action-runner:pr-${{ github.event.number }}" --build-arg "GIT_SHA=${{ github.sha }}" apps/wgd-action-runner | ||
|
||
- name: Build hugo docs | ||
run: | | ||
docker run \ | ||
-v "${GITHUB_WORKSPACE}/hugo:/site" \ | ||
-v "${GITHUB_WORKSPACE}/website:/website" \ | ||
-v "/var/www/pr-${{ github.event.number }}.wikigdrive.com:/dist/hugo" \ | ||
--env CONFIG_TOML="/site/config/_default/config.toml" --env BASE_URL="https://pr-${{ github.event.number }}.wikigdrive.com" \ | ||
wgd-action-runner:pr-${{ github.event.number }} /steps/step_render_hugo | ||
|
||
- name: Copy index for vite | ||
run: mkdir -p ${GITHUB_WORKSPACE}/dist/hugo && cp -rf /var/www/pr-${{ github.event.number }}.wikigdrive.com/* ${GITHUB_WORKSPACE}/dist/hugo | ||
|
||
- name: build | ||
uses: whoan/docker-build-with-cache-action@v5 | ||
with: | ||
image_name: "wikigdrive-feature" | ||
image_tag: "${{ github.sha }}" | ||
push_image_and_stages: false | ||
build_extra_args: "{'--build-arg': 'GIT_SHA=${{ github.sha }}'}" | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Use Node.js 20.x | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: 20 | ||
cache: npm | ||
|
||
- name: Build action runner | ||
run: docker build -t "wgd-action-runner:pr-${{ github.event.number }}" --build-arg "GIT_SHA=${{ github.sha }}" apps/wgd-action-runner | ||
|
||
- name: Build hugo docs | ||
run: | | ||
docker run \ | ||
-v "${GITHUB_WORKSPACE}/hugo:/site" \ | ||
-v "${GITHUB_WORKSPACE}/website:/website" \ | ||
-v "/var/www/pr-${{ github.event.number }}.wikigdrive.com:/dist/hugo" \ | ||
--env CONFIG_TOML="/site/config/_default/config.toml" --env BASE_URL="https://pr-${{ github.event.number }}.wikigdrive.com" \ | ||
wgd-action-runner:pr-${{ github.event.number }} /steps/step_render_hugo | ||
|
||
- name: Copy index for vite | ||
run: mkdir -p ${GITHUB_WORKSPACE}/dist/hugo && cp -rf /var/www/pr-${{ github.event.number }}.wikigdrive.com/* ${GITHUB_WORKSPACE}/dist/hugo | ||
|
||
- name: build | ||
uses: docker/build-push-action@v6 | ||
with: | ||
tags: "wikigdrive-feature:${{ github.sha }}" | ||
push: false | ||
build-args: "{'--build-arg': 'GIT_SHA=${{ github.sha }}'}" | ||
|
||
- name: Stop and remove | ||
run: docker stop "pr-${{ github.event.number }}" ; docker rm "pr-${{ github.event.number }}" | ||
continue-on-error: true | ||
|
||
- name: "Create empty volume" | ||
run: docker volume rm -f "pr-${{ github.event.number }}" ; docker volume create "pr-${{ github.event.number }}" | ||
|
||
- name: Start | ||
run: | | ||
docker run -d --name "pr-${{ github.event.number }}" \ | ||
--restart unless-stopped \ | ||
--network nginx \ | ||
--tmpfs /tmp \ | ||
-v "pr-${{ github.event.number }}":/data \ | ||
-v /home/wikigdrive/service_account.json:/service_account.json \ | ||
-v /home/wikigdrive/env.develop:/usr/src/app/.env \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v "/var/www/pr-${{ github.event.number }}.wikigdrive.com:/usr/src/app/dist/hugo" \ | ||
-e "GIT_SHA=${{ github.sha }}" \ | ||
-e "ZIPKIN_URL=https://pr-${{ github.event.number }}.wikigdrive.com/zipkin" \ | ||
-e "ZIPKIN_SERVICE=pr-${{ github.event.number }}" \ | ||
-e "AUTH_DOMAIN=https://dev.wikigdrive.com" \ | ||
-e "AUTH_INSTANCE=pr-${{ github.event.number }}" \ | ||
-e "DOMAIN=https://pr-${{ github.event.number }}.wikigdrive.com" \ | ||
"wikigdrive-feature:${{ github.sha }}" wikigdrive \ | ||
--service_account /service_account.json \ | ||
--share_email [email protected] \ | ||
--workdir /data \ | ||
server 3000 | ||
|
||
remove: | ||
if: github.event.pull_request.head.ref != 'develop' && !contains( github.event.pull_request.labels.*.name, 'deploy-pr') | ||
runs-on: wgd-dev | ||
|
||
steps: | ||
- name: Stop and remove | ||
run: docker stop "pr-${{ github.event.number }}" ; docker rm "pr-${{ github.event.number }}" | ||
continue-on-error: true | ||
|
||
- name: "Create empty volume" | ||
run: docker volume rm -f "pr-${{ github.event.number }}" ; docker volume create "pr-${{ github.event.number }}" | ||
|
||
- name: Start | ||
run: | | ||
docker run -d --name "pr-${{ github.event.number }}" \ | ||
--restart unless-stopped \ | ||
--network nginx \ | ||
-v "pr-${{ github.event.number }}":/data \ | ||
-v /home/wikigdrive/service_account.json:/service_account.json \ | ||
-v /home/wikigdrive/env.develop:/usr/src/app/.env \ | ||
-v /var/run/docker.sock:/var/run/docker.sock \ | ||
-v "/var/www/pr-${{ github.event.number }}.wikigdrive.com:/usr/src/app/dist/hugo" \ | ||
-e "GIT_SHA=${{ github.sha }}" \ | ||
-e "ZIPKIN_URL=https://pr-${{ github.event.number }}.wikigdrive.com/zipkin" \ | ||
-e "ZIPKIN_SERVICE=pr-${{ github.event.number }}" \ | ||
-e "AUTH_DOMAIN=https://dev.wikigdrive.com" \ | ||
-e "AUTH_INSTANCE=pr-${{ github.event.number }}" \ | ||
-e "DOMAIN=https://pr-${{ github.event.number }}.wikigdrive.com" \ | ||
--link=zipkin:zipkin \ | ||
"wikigdrive-feature:${{ github.sha }}" wikigdrive \ | ||
--service_account /service_account.json \ | ||
--share_email [email protected] \ | ||
--workdir /data \ | ||
server 3000 |
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -202,3 +202,13 @@ a[disabled] { | |
border-left: 3px solid var(--bs-gray-500); | ||
padding: 2em 0 2em 3em; | ||
} | ||
|
||
.prism-editor__editor { | ||
font-size: 16px; | ||
font-family: monospace !important; | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Does it work without |
||
} | ||
pre.prism-editor__editor { | ||
overflow-x: scroll; /* Adds a horizontal scrollbar when necessary */ | ||
white-space: pre !important; /* Ensures that text does not wrap */ | ||
word-wrap: normal !important; /* Ensures that long words don't break */ | ||
} |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
do we no longer need
RENDER_IMAGE
,VOLUME_DATA
andVOLUME_PREVIEW
?maybe we should consider adding here placeholders for variables related to JWT and zipkin URL?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In https://github.com/mieweb/wikiGDrive/blob/develop/website/docs/developer-guide.md#running-locally-with-docker we specify those env variables in
docker run
commandI we use both
.env
file and-e RENDER_IMAGE...
it's not clear which env would be used by wikigdrive.