Skip to content

Commit 4bc7d8d

Browse files
author
Emilien Escalle
committed
ci: publish wiki home page
1 parent 0f094d0 commit 4bc7d8d

File tree

1 file changed

+28
-15
lines changed

1 file changed

+28
-15
lines changed

.github/workflows/publish.yml

Lines changed: 28 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,17 @@ jobs:
1010

1111
steps:
1212
- uses: actions/checkout@master
13-
- run: mkdir ./site
14-
- run: 'echo -e "---\nlayout: default\ntitle: Home\n---\n" > ./site/index.md'
15-
- run: 'echo "$(sed -r s"/(\{%[^%]+%\})/{% raw %}\1{% endraw %}/g" ./README.md)" >> ./site/index.md'
16-
- uses: actions/upload-artifact@v1
13+
- run: |
14+
mkdir -p ./artifact/wiki
15+
cp ./README.md ./artifact/wiki/Home.md
16+
mkdir -p ./artifact/site
17+
echo -e "---\nlayout: default\ntitle: Home\n---\n" > ./artifact/site/index.md
18+
echo "$(sed -r s"/(\{%[^%]+%\})/{% raw %}\1{% endraw %}/g" ./README.md)" >> ./artifact/site/index.md
19+
20+
- uses: actions/upload-artifact@v2
1721
with:
18-
name: site
19-
path: ./site
22+
name: artifact
23+
path: ./artifact
2024

2125
phpdoc:
2226
runs-on: ubuntu-latest
@@ -48,12 +52,12 @@ jobs:
4852
4953
- name: Configure phpdoc-md
5054
run: |
51-
mkdir -p ./site/phpdoc;
55+
mkdir -p ./artifact/site/phpdoc;
5256
5357
php -d display_errors=0 -d error_reporting=0 -r "file_put_contents('.phpdoc-md','<?php
5458
return (object)[
5559
\'rootNamespace\' => \'CssLint\',
56-
\'destDirectory\' => \'./site/phpdoc\',
60+
\'destDirectory\' => \'./artifact/site/phpdoc\',
5761
\'format\' => \'github\',
5862
\'classes\' => '.var_export (array_values(array_filter(
5963
array_keys(require('./vendor/composer/autoload_classmap.php')),
@@ -68,23 +72,32 @@ jobs:
6872
- name: Execute phpdoc-md
6973
run: |
7074
vendor/bin/phpdoc-md -v
71-
mv ./site/phpdoc/README.md ./site/phpdoc/index.md
75+
mv ./artifact/site/phpdoc/README.md ./artifact/site/phpdoc/index.md
7276
73-
- uses: actions/upload-artifact@v1
77+
- uses: actions/upload-artifact@v2
7478
with:
75-
name: site
76-
path: ./site
79+
name: artifact
80+
path: ./artifact
7781

7882
build_and_deploy:
7983
runs-on: ubuntu-latest
8084
needs: [homepage, phpdoc]
8185
steps:
82-
- uses: actions/download-artifact@v1
86+
- uses: actions/download-artifact@v2
8387
with:
84-
name: site
88+
name: artifact
8589
- uses: peaceiris/actions-gh-pages@v3
8690
with:
8791
github_token: ${{ secrets.GITHUB_TOKEN }}
88-
publish_dir: ./site
92+
publish_dir: ./artifact/site
8993
enable_jekyll: true
9094
keep_files: true
95+
96+
- uses: Decathlon/wiki-page-creator-action@v2.0.0
97+
env:
98+
GH_PAT: ${{ secrets.GITHUB_TOKEN }}
99+
ACTION_MAIL: action@github.com
100+
ACTION_NAME: GitHub Action
101+
OWNER: ${{ github.actor }}
102+
REPO_NAME: ${{ github.repository }}
103+
MD_FOLDER: ./artifact/wiki

0 commit comments

Comments
 (0)