Skip to content

Commit e8a2f3d

Browse files
Merge pull request #1 from kiarashvosough1999/added-action-steps
Added action steps
2 parents 6c41927 + 5090b57 commit e8a2f3d

File tree

2 files changed

+80
-0
lines changed

2 files changed

+80
-0
lines changed

LICENSE

Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
MIT License
2+
3+
Copyright (c) 2022 Kiarash Vosough
4+
5+
Permission is hereby granted, free of charge, to any person obtaining a copy
6+
of this software and associated documentation files (the "Software"), to deal
7+
in the Software without restriction, including without limitation the rights
8+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9+
copies of the Software, and to permit persons to whom the Software is
10+
furnished to do so, subject to the following conditions:
11+
12+
The above copyright notice and this permission notice shall be included in all
13+
copies or substantial portions of the Software.
14+
15+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21+
SOFTWARE.

action.yml

Lines changed: 59 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
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

Comments
 (0)