Skip to content

Commit 00ab296

Browse files
authored
Website setup (#2855)
* doc: Initial setup for website * doc: Updated DEVELOPER_MANUAL.md * fix: Updated k-web-theme * fix: Updated k-web-theme * feat: Upgraded k-web-theme to the latest
1 parent 7514677 commit 00ab296

16 files changed

+8214
-72
lines changed

.gitmodules

+3
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[submodule "web/k-web-theme"]
2+
path = web/k-web-theme
3+
url = https://github.com/runtimeverification/k-web-theme

Dockerfile

+13
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ RUN apt update \
1111
libtinfo-dev \
1212
curl git make unzip
1313

14+
RUN curl -sL https://deb.nodesource.com/setup_14.x | bash -
15+
RUN apt-get update \
16+
&& apt-get upgrade --yes \
17+
&& apt-get install --yes nodejs
18+
1419
ARG STACK=2.5.1
1520
RUN curl -sSL https://raw.githubusercontent.com/commercialhaskell/stack/v$STACK/etc/scripts/get-stack.sh | sh
1621

@@ -38,3 +43,11 @@ RUN ( cd .tmp-haskell && stack build --only-snapshot --test --bench --haddock
3843
ADD --chown=user:user docker/ssh/config .ssh/
3944
RUN git config --global user.email "[email protected]" \
4045
&& git config --global user.name "RV Jenkins"
46+
47+
RUN mkdir -p ~/.ssh \
48+
&& echo 'host github.com' > ~/.ssh/config \
49+
&& echo ' hostname github.com' >> ~/.ssh/config \
50+
&& echo ' user git' >> ~/.ssh/config \
51+
&& echo ' identityagent SSH_AUTH_SOCK' >> ~/.ssh/config \
52+
&& echo ' stricthostkeychecking accept-new' >> ~/.ssh/config \
53+
&& chmod go-rwx -R ~/.ssh

Jenkinsfile

+32
Original file line numberDiff line numberDiff line change
@@ -114,6 +114,38 @@ pipeline {
114114
}
115115
}
116116
}
117+
stage('Deploy') {
118+
when { branch 'master' }
119+
stages {
120+
stage('GitHub Pages') {
121+
steps {
122+
sshagent(['rv-jenkins-github']) {
123+
dir('project-site') {
124+
sh '''
125+
git clone 'ssh://github.com/kframework/kore.git'
126+
cd kore
127+
git checkout -B gh-pages origin/master
128+
git submodule update --init --recursive -- ./web
129+
cd web
130+
npm install
131+
npm run build
132+
npm run build-sitemap
133+
cd -
134+
mv web/public_content ./
135+
rm -rf $(find . -maxdepth 1 -not -name public_content -a -not -name .git -a -not -path . -a -not -path .. -a -not -name CNAME)
136+
mv public_content/* ./
137+
rm -rf public_content
138+
git add ./
139+
git commit -m 'gh-pages: Updated the website'
140+
git merge --strategy ours origin/gh-pages --allow-unrelated-histories
141+
git push origin gh-pages
142+
'''
143+
}
144+
}
145+
}
146+
}
147+
}
148+
}
117149
}
118150
post {
119151
unsuccessful {

0 commit comments

Comments
 (0)