Upload Artifact #5
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: Upload Artifact | |
on: | |
workflow_run: | |
branches: [main] | |
workflows: [Test docs] | |
types: | |
- completed | |
# Cancel running jobs for the same workflow and branch. | |
concurrency: | |
group: publish-docs | |
jobs: | |
publish-docs: | |
runs-on: ubuntu-latest | |
if: ${{ github.event.workflow_run.conclusion == 'success' }} && github.ref == 'refs/heads/main' | |
steps: | |
- run: echo 'The Test docs workflow passed' | |
- name: download-artifact | |
uses: dawidd6/action-download-artifact@v2 | |
with: | |
workflow: ${{ github.event.workflow_run.workflow_id }} | |
workflow_conclusion: success | |
name: artifacts_docs | |
- name: unzip-artifact | |
run: | | |
unzip artifacts_docs.zip | |
unzip docs_results.zip | |
- name: cleanup folder | |
uses: actions/delete-workspace@v1 | |
with: | |
path: docs_results/.results_docs/html/.doctrees | |
- name: upload-pages-artifact | |
uses: actions/upload-pages-artifact@v2 | |
- name: Archive artifact | |
shell: sh | |
run: | | |
tar \ | |
--dereference --hard-dereference \ | |
--directory "docs_results/.results_docs/html/" \ | |
-cvf "artifact.tar" \ | |
--exclude=.git \ | |
--exclude=.github \ | |
. | |
- name: Upload artifact | |
uses: actions/upload-artifact@v3 | |
with: | |
path: artifact.tar | |
if-no-files-found: error |