liuyuqi-dellpc 3 years ago
parent
commit
a56aac0bff
2 changed files with 6 additions and 5 deletions
  1. 4 3
      .github/workflows/build.yml
  2. 2 2
      convert.go

+ 4 - 3
.github/workflows/build.yml

@@ -51,11 +51,12 @@ jobs:
         run: go build convert.go
         working-directory: ./
 
-      - name: docker push
+      - name: docker build
         run: |
           docker login --username=${{ secrets.USERNAME }} --password ${{ secrets.PASSWORD }} ccr.ccs.tencentyun.com
           docker build . -t ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.4
+
+      - name: docker push
           docker push ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.4
           docker tag $(docker images ccr.ccs.tencentyun.com/jianboy/wordtohtml:v1.0.4 -q) ccr.ccs.tencentyun.com/jianboy/wordtohtml:latest
-          docker push ccr.ccs.tencentyun.com/jianboy/wordtohtml:latest
-          
+          docker push ccr.ccs.tencentyun.com/jianboy/wordtohtml:latest

+ 2 - 2
convert.go

@@ -13,6 +13,6 @@ func doCommand(cmd string) {
 func main() {
 	// if diretory not exist, create it
 	doCommand("mkdir -p output")
-	doCommand("libreoffice --headless --convert-to html *.doc --outdir output")
-	doCommand("libreoffice --headless --convert-to html *.docx --outdir output")
+	doCommand("libreoffice --headless --convert-to html:XHTML Writer File:UTF8 *.doc --outdir output")
+	doCommand("libreoffice --headless --convert-to html:XHTML Writer File:UTF8 *.docx --outdir output")
 }