|
| 1 | +name: 'Deploy DocC To Github-Pages' |
| 2 | +description: 'Deploy DocC generated Static Site To Github-Pages' |
| 3 | + |
| 4 | +inputs: |
| 5 | + docC-generated-static-site-uploaded-name: |
| 6 | + description: 'The name of the ziped artifact which was uploaded on previous steps.(artifact must be zipped with .tar extension only)' |
| 7 | + required: true |
| 8 | + default: 'docC_generated_site_zipped' |
| 9 | + |
| 10 | +outputs: |
| 11 | + docC-page_url: |
| 12 | + description: "DocC Deployed Site URL on Github-Pages" |
| 13 | + value: ${{ steps.deploy-step.outputs.page_url }} |
| 14 | + |
| 15 | +runs: |
| 16 | + using: "composite" |
| 17 | + steps: |
| 18 | + - name: checkout |
| 19 | + uses: actions/checkout@v3 |
| 20 | + with: |
| 21 | + repository: ${{ github.event.pull_request.head.repo.full_name }} |
| 22 | + ref: ${{ github.event.pull_request.head.ref }} |
| 23 | + |
| 24 | + - name: Download a DocC Generated Static Site Zipped artifact |
| 25 | + uses: actions/download-artifact@v3 |
| 26 | + with: |
| 27 | + name: ${{ inputs.docC-generated-static-site-uploaded-name }} |
| 28 | + |
| 29 | + - name: Unarchive Artifact |
| 30 | + shell: bash |
| 31 | + run: | |
| 32 | + mkdir ${{ inputs.docC-generated-static-site-uploaded-name }} |
| 33 | + tar -xf ${{ inputs.docC-generated-static-site-uploaded-name }}.tar -C ./${{ inputs.docC-generated-static-site-uploaded-name }} |
| 34 | +
|
| 35 | + - name: Build Static Site With Jekyll |
| 36 | + uses: actions/jekyll-build-pages@v1 |
| 37 | + with: |
| 38 | + source: ./${{ inputs.docC-generated-static-site-uploaded-name }} |
| 39 | + destination: ./${{ inputs.docC-generated-static-site-uploaded-name }}/__site |
| 40 | + |
| 41 | + - name: Upload Static Site Artifacts |
| 42 | + uses: actions/upload-pages-artifact@v0 |
| 43 | + with: |
| 44 | + name: github-pages |
| 45 | + path: ./${{ inputs.docC-generated-static-site-uploaded-name }}/__site |
| 46 | + retention-days: 1 |
| 47 | + |
| 48 | + - name: Deploy To Pages |
| 49 | + id: deploy-step |
| 50 | + env: |
| 51 | + name: github-pages |
| 52 | + url: ${{ steps.deployment.outputs.page_url }} |
| 53 | + uses: actions/deploy-pages@v1 |
| 54 | + with: |
| 55 | + emit_telemetry: false |
| 56 | + timeout: 600000 |
| 57 | + error_count: 10 |
| 58 | + reporting_interval: 5000 |
| 59 | + artifact_name: github-pages |
0 commit comments