Skip to content

Commit d1146e6

Browse files
committed
git: test formal-spec workflow
1 parent 9d49005 commit d1146e6

File tree

1 file changed

+14
-22
lines changed

1 file changed

+14
-22
lines changed

.github/workflows/formal-spec-listener.yaml

Lines changed: 14 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -78,12 +78,6 @@ jobs:
7878
echo "<html><body><h1>Formal Specification</h1><p>Formal specification documentation is being updated. Please check back later.</p></body></html>" > formal-spec-html/index.html
7979
fi
8080
81-
# Prepare Docusaurus site with formal spec
82-
- name: 📥 Checkout repository (again for site)
83-
uses: actions/checkout@v4
84-
with:
85-
fetch-depth: 2
86-
8781
- name: 🛠️ Setup Node.js
8882
uses: actions/setup-node@v4
8983
with:
@@ -95,9 +89,12 @@ jobs:
9589
working-directory: site
9690
run: yarn install
9791

98-
- name: 📝 Update formal spec
92+
- name: 📝 Prepare formal spec directory
9993
run: |
10094
mkdir -p site/static/formal-spec
95+
# Clear existing formal spec files
96+
rm -rf site/static/formal-spec/*
97+
10198
if [ -d "formal-spec-html" ] && [ -n "$(ls -A formal-spec-html/ 2>/dev/null)" ]; then
10299
cp -r formal-spec-html/* site/static/formal-spec/
103100
fi
@@ -108,26 +105,21 @@ jobs:
108105
run: |
109106
HTML_COUNT=$(find ./static/formal-spec -name '*.html' | wc -l)
110107
if [ "$HTML_COUNT" -gt "0" ]; then
111-
NODE_OPTIONS="--max-old-space-size=6144" npx agda-web-docs-lib process ./static/formal-spec ./agda-docs.config.json
108+
NODE_OPTIONS="--max-old-space-size=4096" npx agda-web-docs-lib process ./static/formal-spec ./agda-docs.config.json
112109
fi
113110
114-
- name: 🏗️ Build Docusaurus site
115-
working-directory: site
111+
- name: 🔧 Configure Git for deployment
116112
run: |
117-
yarn build
118-
119-
- name: Verify Docusaurus build
120-
working-directory: site
121-
run: |
122-
if [ -z "$(ls -A build/)" ]; then
123-
echo "Error: Docusaurus build directory is empty"
124-
exit 1
125-
fi
126-
ls -la build/
113+
git config --global user.name "github-actions[bot]"
114+
git config --global user.email "github-actions[bot]@users.noreply.github.com"
115+
git config --global http.postBuffer 52428800
116+
git config --global core.compression 1
127117
128-
- name: 🚀 Publish GitHub Pages
118+
- name: 🚀 Deploy only formal-spec changes
129119
uses: peaceiris/actions-gh-pages@v4
130120
with:
131121
github_token: ${{ secrets.GITHUB_TOKEN || github.token }}
132-
publish_dir: site/build
122+
publish_dir: site/static/formal-spec
123+
destination_dir: formal-spec
133124
cname: leios.cardano-scaling.org
125+
keep_files: true

0 commit comments

Comments
 (0)