Skip to content

Commit 390ca66

Browse files
committed
Merge branch 'development'
2 parents 7276036 + e4f17da commit 390ca66

File tree

233 files changed

+3587
-9920
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

233 files changed

+3587
-9920
lines changed

.github/workflows/pages.yml

Lines changed: 21 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -24,39 +24,30 @@ on:
2424
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
2525
permissions:
2626
contents: write
27-
pull-requests: write
2827
pages: write
2928
id-token: write
3029

3130
# Allow one concurrent deployment
3231
concurrency:
33-
group: "pages"
34-
cancel-in-progress: true
32+
group: "pages-deployment-${{ github.ref }}"
33+
cancel-in-progress: false
3534

3635
jobs:
3736
# Sync job
3837
sync:
3938
runs-on: ubuntu-latest
40-
if: |
41-
github.event_name == 'push' &&
42-
!contains(github.event.head_commit.message, 'Update documentation') &&
43-
!contains(github.event.head_commit.message, 'Merge pull request')
39+
if: github.event_name == 'push'
40+
permissions:
41+
contents: write
4442
steps:
4543
- name: Checkout
4644
uses: actions/checkout@v4
4745
with:
46+
token: ${{ secrets.GITHUB_TOKEN }}
4847
ref: development
4948

5049
- name: Sync and commit documentation
5150
run: |
52-
# Ensure we have the latest development branch
53-
git fetch origin development
54-
55-
# Create a new branch with timestamp to avoid conflicts
56-
BRANCH_NAME="docs-update-$(date +%Y%m%d-%H%M%S)"
57-
echo "BRANCH_NAME=$BRANCH_NAME" >> $GITHUB_ENV
58-
git checkout -b $BRANCH_NAME
59-
6051
# Create temporary backup directory
6152
mkdir -p temp_backup
6253
@@ -147,57 +138,22 @@ jobs:
147138
done
148139
fi
149140
done
150-
151-
# Configure git
152-
git config --local user.email "github-actions[bot]@users.noreply.github.com"
153-
git config --local user.name "github-actions[bot]"
154-
155-
# Add and commit changes
156-
git add docs
157-
158-
# Only proceed if there are changes to commit
159-
if git diff --staged --quiet; then
160-
echo "No documentation changes to commit"
161-
echo "CHANGES_EXIST=false" >> $GITHUB_ENV
162-
exit 0
163-
else
164-
git commit -m "Update documentation"
165-
git push origin $BRANCH_NAME
166-
echo "CHANGES_EXIST=true" >> $GITHUB_ENV
167-
fi
168-
169-
- name: Create Pull Request
170-
if: success() && env.CHANGES_EXIST == 'true'
171-
run: |
172-
gh pr create \
173-
--base development \
174-
--head $BRANCH_NAME \
175-
--title "Update Documentation $(date +%Y-%m-%d)" \
176-
--body "Automated documentation update from GitHub Actions
177-
178-
This PR updates the documentation to match the current project structure.
179-
180-
Changes include:
181-
- Synchronized documentation structure with main project
182-
- Preserved configuration files, layouts, and assets
183-
- Updated all markdown files"
184-
env:
185-
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
141+
- name: Upload the directory as an artifact
142+
uses: actions/upload-artifact@v4
143+
with:
144+
name: docs
145+
path: docs
186146

187147
# Build job
188148
build:
189149
runs-on: ubuntu-latest
190-
if: |
191-
github.event_name == 'pull_request' &&
192-
github.event.pull_request.merged == true
150+
needs: sync
193151
steps:
194-
- name: Checkout
195-
uses: actions/checkout@v4
152+
- name: Download the artifact
153+
uses: actions/download-artifact@v5
196154
with:
197-
ref: development
198-
fetch-depth: 0 # Fetch all history so we have the latest changes
199-
- name: Git Pull
200-
run: git pull origin development # Ensure we have the latest development branch
155+
name: docs
156+
path: docs
201157
- name: Setup Ruby
202158
uses: ruby/setup-ruby@v1
203159
with:
@@ -223,20 +179,15 @@ jobs:
223179

224180
# Deployment job
225181
deploy:
182+
needs: build
183+
permissions:
184+
pages: write # to deploy to Pages
185+
id-token: write # to verify the deployment originates from an appropriate source
226186
environment:
227187
name: github-pages
228188
url: ${{ steps.deployment.outputs.page_url }}
229189
runs-on: ubuntu-latest
230-
needs: build
231-
if: |
232-
github.event_name == 'pull_request' &&
233-
github.event.pull_request.merged == true
234-
permissions:
235-
pages: write
236-
id-token: write
237190
steps:
238191
- name: Deploy to GitHub Pages
239192
id: deployment
240-
uses: actions/deploy-pages@v3
241-
with:
242-
token: ${{ secrets.GITHUB_TOKEN }}
193+
uses: actions/deploy-pages@v4

ARCHITECTURE.md

Lines changed: 11 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -16,15 +16,15 @@ Each `Instance` specifies a DCS executable that can be launched on that specific
1616
your Saved Games directory. The single instance that every server should have is DCS.release_server.
1717

1818
Each instance has its own UDP communication port (default 6666). It will contact the DCSServerBot via UDP usually
19-
over port 10042. The whole communication is UDP based. This has a slight risk of data loss, but is non-blocking
20-
and much faster. Very large servers run DCSServerBot. It has a small payload in DCS and only has a very small
21-
performance impact on your servers.
19+
over port 10042. The whole communication is UDP-based. This has a slight risk of data loss, but is non-blocking
20+
and much faster. Huge servers run DCSServerBot. It has a small payload in DCS and only has a tiny performance impact
21+
on your servers, if ever.
2222

2323
### Server
2424
Each `Server` specifies a __configuration__ that can be loaded into an instance. Even if there is usually a 1-to-1
2525
connection between instances and servers, servers might be moved from one instance to another. Imagine your instance
2626
providing power, availability and maybe components like TacView, LotAtc, SRS and your server configuration having a
27-
name, the number of players and a password. You can easily move around that information from one Instance to another,
27+
name, the number of players and a password. You can move around that information from one Instance to another,
2828
even to another Node. That's why I decided to loosely couple that information and not hard code it into each node.
2929

3030
> ❗ A standard configuration will only have one node and probably only one server.
@@ -65,10 +65,11 @@ You can find more information on how to do that [here](./services/README.md).
6565
`Plugins` are modules that only run on your bot. This is important to know and to understand, because they for
6666
instance don't have easy access to some file system on any remote node. They communicate with any other object like
6767
other nodes, services on other nodes or other servers via so called `Proxies`. A proxy provides the same interface as
68-
the real object. If you for instance access any server object, you access the real implementation if that server is
68+
the real object. If you, for instance, access any server object, you access the real implementation if that server is
6969
running on the same node or
7070

71-
DCSServerBot comes with a lot of services and plugins already, that are all described in more detail in this documentation.<br>
71+
DCSServerBot comes with a lot of services and plugins already, that are all described in more detail in their
72+
respective README-files.<br>
7273
You can enhance DCSServerBot by implementing your own services and / or plugins (or hybrids). You'll find a howto
7374
[here](./plugins/README.md) and [here](./services/README.md).
7475

@@ -100,12 +101,9 @@ installed on a cloud drive already. This helps you to keep a single configuratio
100101
### Cloud Database
101102
You can either host a database on one of your nodes, which creates another single point of failure, or have a cloud
102103
database at some of the prominent cloud services. As the bot databases don't get that large, it should not be a big
103-
deal. I have one for $7 a month, running our 2 bots and 10 servers on it. That's an easy investment.
104+
deal. I have one for approx $7 a month, running our 2 bots and 10 servers on it. That's an easy investment.
104105

105106
### Automatic Fail-over
106-
At the moment, the bot can do automatic fail-overs for the Discord bot service. This will make sure that the bot is
107-
responsive on Discord at any time, even if one of your nodes crashes (prerequisite: cloud database).
108-
109-
_It is planned, to have automatic server takeovers also. That means, if you have a very prominent server that it can
110-
for instance take down your development instance on another host, if needs be, and make sure the production server
111-
is up and running 24x7. As DCS does not support hot migration, the mission will start fresh like after a restart._
107+
At the moment, the bot can do automatic fail-overs for and service that is configured as a Master only service (like
108+
the Discord bot service). This will ensure that the bot is responsive on Discord at any time, even if one of your
109+
nodes crashes (prerequisite: cloud database).

MULTINODE.md

Lines changed: 7 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,9 @@ A standard PostgreSQL installation does not allow remote access to the database.
7777
In addition, you would need to allow external access to your database by forwarding the database port (default: 5432)
7878
from your router to the PC running the database. You can also get a cloud database. There are many providers out there
7979
where you can rent one for relatively small money.
80+
> [!IMPORTANT]
8081
> For a secure communication, you should consider enabling SSL in your database. A howto for that would be too much
81-
> for this little guide, but there are lots of guides available in the web how to do that.
82+
> for this little guide, but there are lots of guides available on the web how to do that.
8283
8384
## Running multiple versions of DCS World on one PC
8485
One DCSServerBot node can run as many DCS servers as your PC can handle, but they all share the very same DCS World
@@ -88,6 +89,7 @@ DCSServerBot uses the hostname of the PC as node name, if not specified otherwis
8889
the same PC, you need to specify an additional parameter -n (or --node) on startup (e.g. `run -n node01`).<br>
8990
This will start a new node (you'll be prompted for the installation of it, if it does not exist yet), with the name
9091
"node01".
92+
> [!IMPORTANT]
9193
> The node-name has to be unique in your **whole cluster**.
9294
9395
## Running multiple Nodes on multiple PCs
@@ -129,6 +131,7 @@ what the bot will create during a default installation also.
129131
130132
### Moving a Server from one Node / Instance to another
131133
Each server is loosely coupled to an instance on a node. You can migrate a server to another instance though, by using
132-
the `/server migrate` command. Please keep in mind that - unless you use a central missions directory - the necessary
133-
missions (or scripts) for this server might not be available on the other node and the migration will end up in a state
134-
that you had not planned.
134+
the `/server migrate` command.
135+
> [!NOTE]
136+
> Unless you use a central missions directory, the necessary missions (or scripts) for this server might not be
137+
> available on the other node and the migration will end up in an incomplete state.

0 commit comments

Comments
 (0)