File tree Expand file tree Collapse file tree 5 files changed +35
-23
lines changed
Expand file tree Collapse file tree 5 files changed +35
-23
lines changed Original file line number Diff line number Diff line change 1+ name : Website
2+
3+ on :
4+ push :
5+ branches : [ master ]
6+
7+ jobs :
8+
9+ build :
10+ name : Website
11+ runs-on : ubuntu-latest
12+ timeout-minutes : 60
13+ steps :
14+ - uses : actions/checkout@v2
15+ - name : build
16+ env :
17+ USER : ${{ secrets.SERVER_USER }}
18+ TARGET : ${{ secrets.SERVER_PATH }}
19+ KEY : ${{ secrets.SERVER_KEY }}
20+ DOMAIN : ${{ secrets.SERVER_DOMAIN }}
21+ run : |
22+ make build
23+ mkdir ~/.ssh
24+ echo "$KEY" | tr -d '\r' > ~/.ssh/id_ed25519
25+ chmod 400 ~/.ssh/id_ed25519
26+ eval "$(ssh-agent -s)"
27+ ssh-add ~/.ssh/id_ed25519
28+ ssh-keyscan -H $DOMAIN >> ~/.ssh/known_hosts
29+ scp -r website/public/modern-cpp/* $USER@$DOMAIN:$TARGET
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1- DOCKER_ENV =changkun/modern-cpp-tutorial:build-env
1+ NAME =modern-cpp-tutorial
2+ DOCKER_ENV =changkun/$(NAME ) :build-env
23TARGET = pdf epub
34LANGS = zh-cn en-us
45ALL_BUILDS = website $(TARGET )
@@ -11,14 +12,14 @@ $(TARGET): $(LANGS)
1112 mkdir -p website/public/modern-cpp/$@ /
1213 for lang in $^ ; do \
1314 cd $@ /$$ {lang} && make && make clean && cd ../..; \
14- mv $@ /$$ {lang}/modern-cpp-tutorial .$@ website/public/modern-cpp/$@ /modern-cpp-tutorial -$$ {lang}.$@ ; \
15+ mv $@ /$$ {lang}/$( NAME ) .$@ website/public/modern-cpp/$@ /$( NAME ) -$$ {lang}.$@ ; \
1516 done
1617
1718website :
1819 cd website && make
1920
2021build :
21- docker run --rm -v ` pwd` :/modern-cpp-tutorial -it $(DOCKER_ENV ) make
22+ docker run --rm -v ` pwd` :/$( NAME ) $(DOCKER_ENV ) make
2223
2324# dev
2425
Original file line number Diff line number Diff line change 11FROM node:latest
22
3- LABEL "maintainer" ="Changkun Ou <hi@ changkun.us >"
3+ LABEL "maintainer" ="Changkun Ou <hi[at] changkun.de >"
44LABEL "repository" ="https://github.com/changkun/modern-cpp-tutorial"
55LABEL "homepage" ="https://changkun.de/modern-cpp/"
66
7- # FUCKING UNICODE
7+ # For Unicode
88ENV LANG C.UTF-8
99ENV LC_ALL C.UTF-8
1010
You can’t perform that action at this time.
0 commit comments