-
Notifications
You must be signed in to change notification settings - Fork 1
57 lines (48 loc) · 1.62 KB
/
Copy pathmake-relese.yml
File metadata and controls
57 lines (48 loc) · 1.62 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
name: Build pdf
on:
push:
tags:
- '*'
env:
GITHUB_TOKEN: ${{ github.token }}
URL: https://raw.githubusercontent.com/DevOps-and-Cloud-based-Software/week2/${{ github.ref_name }}
jobs:
publish:
runs-on: ubuntu-latest
name: Publish Document
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Replace links
run: |
cp README.md README_WITH_LINKS.md
sed -i -e "s#src=\"/images/#src=\"$URL/images/#g" README_WITH_LINKS.md
for file in sources/*; do sed -i -e "s#($file)#($URL/$file)#g" README_WITH_LINKS.md ; done
- name: urls-checker
uses: urlstechie/urlchecker-action@master
with:
file_types: .md,yaml,json
retry_count: 3
exclude_patterns: http://IP:NODE_PORT,http://localhost,https://virtserver.swaggerhub.com/,http://IP
- name: Publish PDF Document
uses: shrink/actions-document-publish@v1
id: publish-document
with:
sources: 'README_WITH_LINKS.md'
- name: Get PDF name from README title
id: get-pdf-name
run: |
title=$(head -1 README.md)
echo "pdf_name=$name" >> $GITHUB_OUTPUT
- name: Upload Document
uses: actions/upload-artifact@v4
id: upload-document
with:
name: "3-Cloud-Computing-Foundation-Reporting-Guidelines.pdf"
path: ${{ steps.publish-document.outputs.pdf }}
- name: Upload README_WITH_LINKS.md
uses: actions/upload-artifact@v4
id: upload-readme-file
with:
name: 'README_WITH_LINKS.md'
path: README_WITH_LINKS.md