File tree Expand file tree Collapse file tree 1 file changed +33
-0
lines changed
Expand file tree Collapse file tree 1 file changed +33
-0
lines changed Original file line number Diff line number Diff line change 1+ on :
2+ release :
3+ types :
4+ - published
5+ name : Deploy released binaries
6+ jobs :
7+ deploy_documentation :
8+ runs-on : ubuntu-latest
9+ steps :
10+ - name : Checkout
11+ uses : actions/checkout@v1
12+ - name : Get the release version from the GITHUB_REF variable as new SHORT_VERSION variable
13+ run : echo "SHORT_VERSION=$(echo ${GITHUB_REF} | sed -E 's/^refs\/heads\/.*/develop/' | sed -E 's/^(refs\/tags\/v)?(.*)(\.[0-9]+\.[0-9]+)$/\2/')" >> $GITHUB_ENV
14+ - run : misc/download-mdbook.sh 0.3.5
15+ env :
16+ OS_NAME : linux
17+ - name : Generate the documentation
18+ run : mdbook build --dest-dir book/v${SHORT_VERSION} docs/
19+ - run : git clone -q -b gh-pages https://github.com/$GITHUB_REPOSITORY gh-pages
20+ - name : Remove old files for this version
21+ run : rm -Rf gh-pages/docs/v$SHORT_VERSION
22+ - name : copy the documentation content
23+ run : cp -R docs/book/* gh-pages/docs/
24+ - run : git add docs/v$SHORT_VERSION
25+ working-directory : gh-pages
26+ - run : git -c user.name='gh-actions' -c user.email='gh-actions' commit --allow-empty -m "add documentation for version $SHORT_VERSION"
27+ working-directory : gh-pages
28+ - name : Push changes
29+ uses : ad-m/github-push-action@v0.6.0
30+ with :
31+ github_token : ${{ secrets.GITHUB_TOKEN }}
32+ directory : gh-pages
33+ branch : gh-pages
You can’t perform that action at this time.
0 commit comments