File tree Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Expand file tree Collapse file tree 1 file changed +45
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ push :
3+ branches :
4+ - master
5+ - restore-gh-pages
6+
7+ name : Publish Docs
8+ jobs :
9+ publish_docs :
10+ if : github.repository == 'KWARC/rust-libxml'
11+ name : Publish Docs
12+ runs-on : ubuntu-latest
13+ steps :
14+ - name : Install dependencies
15+ run : |
16+ sudo apt-get update
17+ sudo apt-get -y libxml2-dev
18+ - name : Set up LIBXML2 env var if compiling with the default bindings
19+ run : echo "LIBXML2=$(pkg-config libxml-2.0 --variable=libdir)/libxml2.so" >> "$GITHUB_ENV"
20+ - uses : actions-rs/toolchain@v1
21+ with :
22+ profile : minimal
23+ toolchain : stable
24+ override : true
25+ - name : Checkout sources
26+ uses : actions/checkout@v4
27+ - name : Build Documentation
28+ uses : actions-rs/cargo@v1
29+ with :
30+ command : doc
31+ args : --all --no-deps
32+
33+ - name : Deploy Documentation
34+ env :
35+ PUBLISH_BRANCH : gh-pages
36+ PUBLISH_DIR : ./target/doc
37+ run : |
38+ git config user.name "${GITHUB_ACTOR}"
39+ git config user.email "${GITHUB_ACTOR}@users.noreply.github.com"
40+ git fetch origin ${PUBLISH_BRANCH}
41+ git checkout ${PUBLISH_BRANCH}
42+ find "${GITHUB_WORKSPACE}/${PUBLISH_DIR}" -maxdepth 1 | tail -n +2 | xargs -I % cp -rf % "."
43+ git add --all
44+ git commit --allow-empty -m "Automated deployment: $(date -u) ${GITHUB_SHA}"
45+ git push origin ${PUBLISH_BRANCH}
You can’t perform that action at this time.
0 commit comments