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