File tree Expand file tree Collapse file tree 1 file changed +55
-0
lines changed
Expand file tree Collapse file tree 1 file changed +55
-0
lines changed Original file line number Diff line number Diff line change 1+ name : Update wl-docs
2+
3+ on :
4+ push :
5+ branches :
6+ - actions
7+ - master
8+ paths :
9+ - ' **.texi'
10+ workflow_dispatch :
11+
12+ jobs :
13+ update_documents :
14+ runs-on : ubuntu-latest
15+ env :
16+ SRCDIR : srcdir
17+ SOURCE_FILES : ' doc/wl.texi doc/wl-ja.texi doc/version.texi'
18+ TXI_FILES : ' wl.texi wl-ja.texi'
19+ WORKDIR : wl-docs
20+ steps :
21+ - uses : actions/checkout@v4
22+ with :
23+ path : ${{ env.SRCDIR }}
24+ - uses : actions/create-github-app-token@v1
25+ id : app-token
26+ with :
27+ app-id : ${{ secrets.APP_ID }}
28+ private-key : ${{ secrets.PRIVATE_KEY }}
29+ owner : ${{ github.repository_owner }}
30+ - uses : actions/checkout@v4
31+ with :
32+ path : ${{ env.WORKDIR }}
33+ repository : ${{ vars.WLDOCS_REPO }}
34+ token : ${{ steps.app-token.outputs.token }}
35+ - name : Install required packages
36+ run : sudo apt-get install texinfo
37+ - name : Update documents
38+ run : |
39+ (cd $SRCDIR ; cp $SOURCE_FILES ../$WORKDIR)
40+ (cd $WORKDIR ; echo $TXI_FILES | xargs -n 1 texi2any --ifinfo --no-split --html --css-ref=janix-texinfo.css)
41+ - name : Commit documents
42+ id : commit
43+ continue-on-error : true
44+ run : |
45+ cd $WORKDIR
46+ git config user.name "GitHub Actions"
47+ git config user.email "action@github.com"
48+ git commit -a -m 'Update by GitHub actions'
49+ cd ..
50+ - name : Push documents
51+ if : ${{ steps.commit.outcome == 'success' }}
52+ run : |
53+ cd $WORKDIR
54+ git push
55+ cd ..
You can’t perform that action at this time.
0 commit comments