dita-ot / dita-ot-action

GitHub Action for building PDFs and static websites using DITA Open Toolkit
https://www.dita-ot.org
Apache License 2.0
8 stars 4 forks source link

The resource 'file:/github/workspace/.../xyz.dita' cannot be loaded. #10

Closed complexconfusion closed 7 months ago

complexconfusion commented 7 months ago

Expected Behavior

Within index.ditamap referenced dita ressource files should be resolved.

Actual Behavior

The resource 'file:/github/workspace/.../xyz.dita' cannot be loaded.

Possible Solution

Steps to Reproduce

build.yml:

name: moduleMap - Build and Deploy

on:
   push:
      branches:
         -  main

jobs:

   build:
      name: build DITA, HTML, PDF
      runs-on: ubuntu-latest

      steps:
         -  name: checkout
            uses: actions/checkout@v4

         -  name: build DITA xml from panda xml
            run: java -cp bin/morgana/MorganaXProc-IIIse_lib/*:bin/morgana/MorganaXProc-IIIse.jar com.xml_project.morganaxproc3.XProcEngine conf/xproc/modulebook.xpl -option:xml.src.dir=../../src/panda2/ -option:xsl.trans.file=../xsl/panda2dita.xsl -option:dita.out.dir=../../tmp/dita/ -xslt-connector=saxon12-3

         -  name: copy DITA files to tmp/
            run: cp src/panda2/index.ditamap tmp/dita/

         -  name: check files in tmp/
            run: pwd ; ls -l tmp/dita/

         -  name: build PDF from dita xml
            uses: dita-ot/dita-ot-action@master
            with:
               transtype: pdf
               input: tmp/dita/index.ditamap
               output-path: tmp
               properties: --args.gen.task.lbl=yes

         -  name: upload DITA, HTML, PDF outcome to a ZIP file
            uses: actions/upload-artifact@v4
            with:
              name: dita-artifact
              path: 'tmp'
...

Copy of the error message, log file or stack trace

Run pwd ; ls -l tmp/dita/
/home/runner/work/moduleMap/moduleMap
total [4](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:6:5)0
-rw-r--r-- 1 runner docker  [6](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:6:7)391 Mar  [7](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:6:8) 13:20 02_FB-INF_MODULE_MHB_BACHELOR_M_MAT_I.dita
-rw-r--r-- 1 runner docker  6[8](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:6:9)03 Mar  7 13:20 02_FB-INF_MODULE_MHB_BACHELOR_M_MAT_II.dita
-rw-r--r-- 1 runner docker  6[9](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:6:10)62 Mar  7 13:20 02_FB-INF_MODULE_MHB_BACHELOR_M_MAT_III.dita
-rw-r--r-- 1 runner docker 13287 Mar  7 13:20 index.ditamap

Run dita-ot/dita-ot-action@master
/usr/bin/docker run --name d20dac243f56abcc424db5bccd31ebf35df[7](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:8)_0eb226 --label 42d20d --workdir /github/workspace --rm -e "INPUT_TRANSTYPE" -e "INPUT_INPUT" -e "INPUT_OUTPUT-PATH" -e "INPUT_PROPERTIES" -e "INPUT_PLUGINS" -e "INPUT_INSTALL" -e "INPUT_BUILD" -e "INPUT_DITA-OT-VERSION" -e "INPUT_PROJECT" -e "HOME" -e "GITHUB_JOB" -e "GITHUB_REF" -e "GITHUB_SHA" -e "GITHUB_REPOSITORY" -e "GITHUB_REPOSITORY_OWNER" -e "GITHUB_REPOSITORY_OWNER_ID" -e "GITHUB_RUN_ID" -e "GITHUB_RUN_NUMBER" -e "GITHUB_RETENTION_DAYS" -e "GITHUB_RUN_ATTEMPT" -e "GITHUB_REPOSITORY_ID" -e "GITHUB_ACTOR_ID" -e "GITHUB_ACTOR" -e "GITHUB_TRIGGERING_ACTOR" -e "GITHUB_WORKFLOW" -e "GITHUB_HEAD_REF" -e "GITHUB_BASE_REF" -e "GITHUB_EVENT_NAME" -e "GITHUB_SERVER_URL" -e "GITHUB_API_URL" -e "GITHUB_GRAPHQL_URL" -e "GITHUB_REF_NAME" -e "GITHUB_REF_PROTECTED" -e "GITHUB_REF_TYPE" -e "GITHUB_WORKFLOW_REF" -e "GITHUB_WORKFLOW_SHA" -e "GITHUB_WORKSPACE" -e "GITHUB_ACTION" -e "GITHUB_EVENT_PATH" -e "GITHUB_ACTION_REPOSITORY" -e "GITHUB_ACTION_REF" -e "GITHUB_PATH" -e "GITHUB_ENV" -e "GITHUB_STEP_SUMMARY" -e "GITHUB_STATE" -e "GITHUB_OUTPUT" -e "RUNNER_OS" -e "RUNNER_ARCH" -e "RUNNER_NAME" -e "RUNNER_ENVIRONMENT" -e "RUNNER_TOOL_CACHE" -e "RUNNER_TEMP" -e "RUNNER_WORKSPACE" -e "ACTIONS_RUNTIME_URL" -e "ACTIONS_RUNTIME_TOKEN" -e "ACTIONS_CACHE_URL" -e "ACTIONS_RESULTS_URL" -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/moduleMap/moduleMap":"/github/workspace" 42d20d:ac243f56abcc424db5bccd31ebf35df7  "pdf" "tmp/dita/index.ditamap" "tmp" "--args.gen.task.lbl=yes" "" "" "" "" ""
[INFO] DITA-OT version 4.2.1
[INFO] Running pdf build
Error: [DOTX00[8](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:9)E] The resource 'file:/github/workspace/tmp/dita/02_FB-INF_Module_MHB_Bachelor_M_MAT_I.dita' cannot be loaded. Make sure 'file:/github/workspace/tmp/dita/02_FB-INF_Module_MHB_Bachelor_M_MAT_I.dita' exists and that you have permission to access it.
Error: [DOTX008E] The resource 'file:/github/workspace/tmp/dita/02_FB-INF_Module_MHB_Bachelor_M_MAT_II.dita' cannot be loaded. Make sure 'file:/github/workspace/tmp/dita/02_FB-INF_Module_MHB_Bachelor_M_MAT_II.dita' exists and that you have permission to access it.
Error: [DOTX008E] The resource 'file:/github/workspace/tmp/dita/02_FB-INF_Module_MHB_Bachelor_M_MAT_III.dita' cannot be loaded. Make sure 'file:/github/workspace/tmp/dita/02_FB-INF_Module_MHB_Bachelor_M_MAT_III.dita' exists and that you have permission to access it.
Error: Failed to process XML filter: Failed to transform file:/tmp/temp20240307082042420/fd6577[9](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:10)21a393c18bd26d8ee326568923a9cbfc8.dita: /tmp/temp20240307082042420/fd6577921a393c18bd26d8ee326568923a9cbfc8.dita (No such file or directory)
Error: Failed to process XML filter: Failed to transform file:/tmp/temp20240307082042420/d58e7d38148f6e201d4067f59b99656088b2ea8a.dita: /tmp/temp20240307082042420/d58e7d38148f6e201d4067f59b99656088b2ea8a.dita (No such file or directory)
Error: Failed to process XML filter: Failed to transform file:/tmp/temp20240307082042420/587ccdfb9011de402744ef34d6e8e322ca88450b.dita: /tmp/temp20240307082042420/587ccdfb9011de402744ef34d6e8e322ca88450b.dita (No such file or directory)
Warning: file:/github/workspace/tmp/dita/index.ditamap:7:[10](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:11)5: [DOTX026W]: Unable to retrieve linktext from target: 'd58e7d38148f6e201d4067f59b99656088b2ea8a.dita'. Using navigation title as fallback. 
Warning: file:/github/workspace/tmp/dita/index.ditamap:8:107: [DOTX026W]: Unable to retrieve linktext from target: 'fd6577921a393c18bd26d8ee326568923a9cbfc8.dita'. Using navigation title as fallback. 
Warning: file:/github/workspace/tmp/dita/index.ditamap:9:109: [DOTX026W]: Unable to retrieve linktext from target: '587ccdfb90[11](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:12)de402744ef34d6e8e322ca88450b.dita'. Using navigation title as fallback. 
Error: A source of type net.sf.saxon.lib.EmptySource is not supported in this environment
Error: Failed to transform document: Failed to transform document: A source of type net.sf.saxon.lib.EmptySource is not supported in this environment
Error: A source of type net.sf.saxon.lib.EmptySource is not supported in this environment
Error: Failed to transform document: Failed to transform document: A source of type net.sf.saxon.lib.EmptySource is not supported in this environment
Error: A source of type net.sf.saxon.lib.EmptySource is not supported in this environment
Error: Failed to transform document: Failed to transform document: A source of type net.sf.saxon.lib.EmptySource is not supported in this environment
Error: file:/github/workspace/tmp/dita/index.ditamap:7:105: [DOTX008E] The resource 'file:/tmp/temp20240307082042420/d58e7d38[14](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:15)8f6e201d4067f59b99656088b2ea8a.dita' cannot be loaded. Make sure 'file:/tmp/temp20240307082042420/d58e7d38148f6e201d4067f59b99656088b2ea8a.dita' exists and that you have permission to access it.
Error: file:/github/workspace/tmp/dita/index.ditamap:8:107: [DOTX008E] The resource 'file:/tmp/temp20240307082042420/fd6577921a393c[18](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:19)bd26d8ee326568923a9cbfc8.dita' cannot be loaded. Make sure 'file:/tmp/temp[20](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:21)240307082042420/fd65779[21](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:22)a393c18bd26d8ee326568923a9cbfc8.dita' exists and that you have permission to access it.
Error: file:/github/workspace/tmp/dita/index.ditamap:9:109: [DOTX008E] The resource 'file:/tmp/temp20240307082042420/587ccdfb9011de402744ef34d6e8e3[22](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:23)ca88450b.dita' cannot be loaded. Make sure 'file:/tmp/temp20[24](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:25)0307082042420/587ccdfb9011de40[27](https://github.com/aConFlow/moduleMap/actions/runs/8188815140/job/22392132930#step:7:28)44ef34d6e8e322ca88450b.dita' exists and that you have permission to access it.

Environment

complexconfusion commented 7 months ago

Solved. Dita filenames behavior were different on gihub ubuntu machine. Renaming to uppercase did the trick...