diff --git a/.github/workflows/publish-artifacts.yml b/.github/workflows/publish-artifacts.yml index 4ddef3b9..6fe24ddd 100644 --- a/.github/workflows/publish-artifacts.yml +++ b/.github/workflows/publish-artifacts.yml @@ -46,23 +46,26 @@ jobs: with: workflow: ${{ github.event.workflow_run.workflow_id }} name: learn-ocaml-www.zip - path: _site/artifacts/ + path: artifacts/ - name: Get previous artifact learn-ocaml-linux-x86_64 uses: dawidd6/action-download-artifact@v2 with: workflow: ${{ github.event.workflow_run.workflow_id }} name: learn-ocaml-linux-x86_64 - path: _site/artifacts/ + path: artifacts/ - name: Get previous artifact learn-ocaml-darwin-x86_64 uses: dawidd6/action-download-artifact@v2 with: workflow: ${{ github.event.workflow_run.workflow_id }} name: learn-ocaml-darwin-x86_64 - path: _site/artifacts/ - - name: Generate HTML index + path: artifacts/ + - name: Move into place and generate HTML index run: | - cd _site/artifacts - tree -H . -L 1 --noreport --dirsfirst -T Learn-ocaml latest development artifacts' --charset utf-8 -o index.html + ls -hal _site + ls -hal artifacts + mv artifacts _site + cd _site/artifacts && \ + tree -H . -L 1 --noreport --dirsfirst -T Learn-ocaml latest development artifacts' --charset utf-8 -o index.html - name: Upload artifact uses: actions/upload-pages-artifact@v2 diff --git a/.github/workflows/static-builds.yml b/.github/workflows/static-builds.yml index 441d9947..6ac11698 100644 --- a/.github/workflows/static-builds.yml +++ b/.github/workflows/static-builds.yml @@ -30,14 +30,16 @@ jobs: run: 'docker build -t learn-ocaml-compilation --target=compilation .' - name: 'Build ${{ matrix.arch_dir }}.zip' run: | - docker run -i --rm -w /home/opam/install-prefix/share/learn-ocaml -u 0 --entrypoint='' learn-ocaml-compilation sh -c \ - 'mv www "${{ matrix.arch_dir }}" >&2 && apk add --no-cache zip >&2 && zip -r "${{ matrix.arch_dir }}.zip" "${{ matrix.arch_dir }}" >&2 && tar c "${{ matrix.arch_dir }}.zip"' | \ - tar vx - - name: 'Upload ${{ matrix.arch_dir }}.zip' + container=$(docker create learn-ocaml-compilation) + docker cp \ + "$container:/home/opam/install-prefix/share/learn-ocaml/www" \ + '${{ matrix.arch_dir }}' + docker rm "$container" + - name: 'Upload ${{ matrix.arch_dir }}' uses: actions/upload-artifact@v2 with: - name: '${{ matrix.arch_dir }}.zip' - path: '${{ matrix.arch_dir }}.zip' + name: ${{ matrix.arch_dir }} + path: ${{ matrix.arch_dir }}/* static-bin-linux: name: Builds static Linux binaries if: ${{ github.event_name != 'schedule' || github.repository == 'ocaml-sf/learn-ocaml' }}