Skip to content

Commit 92f0892

Browse files
committed
Establish prebuild branch
1 parent 42d2ba6 commit 92f0892

File tree

6,362 files changed

+212
-7980603
lines changed

Some content is hidden

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

6,362 files changed

+212
-7980603
lines changed

.DS_Store

-10 KB
Binary file not shown.

.github/workflows/deploy-docs.yml

Lines changed: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
1+
name: Deploy NetLogo Documentation
2+
3+
on:
4+
push:
5+
branches:
6+
- prebuild
7+
workflow_dispatch:
8+
inputs:
9+
deploy_target:
10+
description: 'Deployment target'
11+
required: false
12+
default: 'staging'
13+
type: choice
14+
options:
15+
- main
16+
- staging
17+
18+
jobs:
19+
build-and-deploy:
20+
runs-on: ubuntu-latest
21+
22+
permissions:
23+
contents: write
24+
pages: write
25+
id-token: write
26+
27+
steps:
28+
- name: Checkout Source Branch
29+
uses: actions/checkout@v4
30+
with:
31+
fetch-depth: 0
32+
33+
- name: Setup Environment Variables
34+
id: setup_vars
35+
run: echo "DIST_DIR=dist" >> $GITHUB_ENV
36+
37+
- name: Build Distribution Files
38+
run: |
39+
mkdir -p ${{ env.DIST_DIR }}
40+
41+
EXCLUDE=("latest" "${{ env.DIST_DIR }}" "$(basename "$0")" ".git" ".github" ".gitignore" "README.md")
42+
for item in *; do
43+
if [[ ! " ${EXCLUDE[@]} " =~ " $item " ]]; then
44+
cp -R "$item" "${{ env.DIST_DIR }}/"
45+
fi
46+
done
47+
48+
if [ -L "latest" ]; then
49+
LATEST_TARGET=$(readlink latest)
50+
if [ -d "$LATEST_TARGET" ]; then
51+
cp -R "$LATEST_TARGET"/* "${{ env.DIST_DIR }}/"
52+
else
53+
echo "::error::'latest' symlink target '$LATEST_TARGET' does not exist."
54+
exit 1
55+
fi
56+
elif [ -d "latest" ]; then
57+
cp -R "latest"/* "${{ env.DIST_DIR }}/"
58+
else
59+
echo "::warning::'latest' directory or symlink not found."
60+
fi
61+
62+
- name: Configure Git
63+
run: |
64+
git config --global user.name "github-actions[bot]"
65+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
66+
67+
- name: Checkout Target Branch
68+
uses: actions/checkout@v4
69+
with:
70+
ref: main
71+
path: main-branch
72+
73+
- name: Deploy to Main Branch
74+
id: deploy
75+
run: |
76+
cd main-branch
77+
78+
# Efficiently remove old files and copy new ones
79+
git rm -rf . && git clean -fxd
80+
cp -R ../${{ env.DIST_DIR }}/* .
81+
82+
git add -A
83+
84+
if git diff --staged --quiet; then
85+
echo "No changes to deploy."
86+
echo "status=no-changes" >> $GITHUB_OUTPUT
87+
else
88+
echo "Changes detected, committing and pushing."
89+
git commit -m "docs: Deploy documentation from prebuild branch
90+
91+
Source commit: ${{ github.sha }}
92+
Branch: ${{ github.ref_name }}
93+
Distribution size: $(du -sh ../${{ env.DIST_DIR }} | cut -f1)"
94+
git push origin main
95+
echo "status=deployed" >> $GITHUB_OUTPUT
96+
fi

.gitignore

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
# Build artifacts
2+
dist/
3+
4+
# Dependency directories
5+
node_modules/
6+
7+
# Environment variables
8+
.env
9+
10+
# OS generated files
11+
.DS_Store
12+
13+
# IDE files
14+
.vscode/
15+
.idea/
16+
17+
# Backup files
18+
*.log
19+
*.tmp
20+
*.bak
21+
*.swp
22+
*.swo

.vscode/settings.json

Lines changed: 0 additions & 5 deletions
This file was deleted.

3d.html

Lines changed: 0 additions & 1636 deletions
This file was deleted.

404.html

Lines changed: 0 additions & 552 deletions
This file was deleted.
File renamed without changes.

7.0.0/index.html

Lines changed: 0 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -550,12 +550,6 @@ <h1 class="nl-col landing mt-0"><span class="break-after">NetLogo</span> 7.0.0 D
550550
<p>
551551
If you use or refer to NetLogo in a publication, we ask that you cite it. For the correct citation, see the <a href="copyright.html">Copyright and License Information</a> page.
552552
</p>
553-
<div class="highlight highlight-warning">
554-
<p>
555-
NetLogo 7.0.0 is a beta release. It is not recommended for production use, but we welcome your
556-
feedback on the new features and changes.
557-
</p>
558-
</div>
559553
</div>
560554
<img
561555
class="nl-col nl-col-lg-4"

0 commit comments

Comments
 (0)