Skip to content

Commit

Permalink
Merge pull request #1 from kiarashvosough1999/added-action-steps
Browse files Browse the repository at this point in the history
Added action steps
  • Loading branch information
kiarashvosough1999 authored Sep 22, 2022
2 parents 6c41927 + 5090b57 commit e8a2f3d
Show file tree
Hide file tree
Showing 2 changed files with 80 additions and 0 deletions.
21 changes: 21 additions & 0 deletions LICENSE
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
MIT License

Copyright (c) 2022 Kiarash Vosough

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
59 changes: 59 additions & 0 deletions action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,59 @@
name: 'Deploy DocC To Github-Pages'
description: 'Deploy DocC generated Static Site To Github-Pages'

inputs:
docC-generated-static-site-uploaded-name:
description: 'The name of the ziped artifact which was uploaded on previous steps.(artifact must be zipped with .tar extension only)'
required: true
default: 'docC_generated_site_zipped'

outputs:
docC-page_url:
description: "DocC Deployed Site URL on Github-Pages"
value: ${{ steps.deploy-step.outputs.page_url }}

runs:
using: "composite"
steps:
- name: checkout
uses: actions/checkout@v3
with:
repository: ${{ github.event.pull_request.head.repo.full_name }}
ref: ${{ github.event.pull_request.head.ref }}

- name: Download a DocC Generated Static Site Zipped artifact
uses: actions/download-artifact@v3
with:
name: ${{ inputs.docC-generated-static-site-uploaded-name }}

- name: Unarchive Artifact
shell: bash
run: |
mkdir ${{ inputs.docC-generated-static-site-uploaded-name }}
tar -xf ${{ inputs.docC-generated-static-site-uploaded-name }}.tar -C ./${{ inputs.docC-generated-static-site-uploaded-name }}
- name: Build Static Site With Jekyll
uses: actions/jekyll-build-pages@v1
with:
source: ./${{ inputs.docC-generated-static-site-uploaded-name }}
destination: ./${{ inputs.docC-generated-static-site-uploaded-name }}/__site

- name: Upload Static Site Artifacts
uses: actions/upload-pages-artifact@v0
with:
name: github-pages
path: ./${{ inputs.docC-generated-static-site-uploaded-name }}/__site
retention-days: 1

- name: Deploy To Pages
id: deploy-step
env:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
uses: actions/deploy-pages@v1
with:
emit_telemetry: false
timeout: 600000
error_count: 10
reporting_interval: 5000
artifact_name: github-pages

0 comments on commit e8a2f3d

Please sign in to comment.