-
Notifications
You must be signed in to change notification settings - Fork 29
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
32 changed files
with
403 additions
and
340 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
name: Publish Core Docs | ||
name: Publish Core Docs | ||
on: [push, pull_request] | ||
jobs: | ||
make-restapi-docs: | ||
|
@@ -10,7 +10,7 @@ jobs: | |
- name: Setup PHP, with composer and extensions | ||
uses: shivammathur/setup-php@v2 #https://github.com/shivammathur/setup-php | ||
with: | ||
php-version: 7.4 | ||
php-version: 8.1 | ||
extensions: mbstring, dom, fileinfo, mysql | ||
- name: Get composer cache directory | ||
id: composer-cache | ||
|
@@ -25,11 +25,13 @@ jobs: | |
restore-keys: ${{ runner.os }}-composer- | ||
- name: Install current dependencies from composer.lock | ||
run: composer install | ||
- name: Install phpDocumentor | ||
- name: Install phpDocumentor | ||
run: | | ||
wget https://phpdoc.org/phpDocumentor.phar | ||
chmod +x phpDocumentor.phar | ||
mv phpDocumentor.phar /usr/local/bin/phpDocumentor | ||
- name: Verify phpDocumentor version | ||
run: phpDocumentor --version | ||
- name: Generate documentation | ||
run: composer run-php-documentor | ||
- name: zip phpdocumentor dir | ||
|
@@ -44,40 +46,40 @@ jobs: | |
runs-on: ubuntu-20.04 | ||
needs: make-restapi-docs | ||
steps: | ||
- name: Checkout phplist/core-docs | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: phpList/core-docs | ||
fetch-depth: 0 | ||
token: ${{ secrets.PUSH_CORE_DOCS }} | ||
- name: Restore REST API Spec | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: doc-files | ||
- name: unzip phpdocumentor | ||
run: | | ||
unzip phpdocumentor.zip | ||
rm phpdocumentor.zip | ||
- name: List Files | ||
run: ls | ||
- name: Sync old files with newly generated ones. | ||
run: rsync -av docs/phpdocumentor/* . | ||
- name: Removed temp dirs | ||
run: rm -rf docs | ||
- name: Check if updates/changes. | ||
run: git status --porcelain > repo-changes.txt | ||
- name: Check changes file | ||
run: cat repo-changes.txt | ||
- name: Verify updates. | ||
id: allow-deploy | ||
run: | | ||
if [ -s repo-changes.txt ]; then echo "Updates made to documentation"; echo '::set-output name=DEPLOY::true'; else echo "No updates made to documentation deployment would be skipped."; echo '::set-output name=DEPLOY::false'; fi | ||
- name: Commit changes and deply | ||
if: ${{ steps.allow-deploy.outputs.DEPLOY == 'true' }} | ||
run: | | ||
rm repo-changes.txt | ||
git config user.name "github-actions" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit -s -m "phplist/core docs deployment `date`" | ||
git push | ||
- name: Checkout phplist/core-docs | ||
uses: actions/checkout@v2 | ||
with: | ||
repository: phpList/core-docs | ||
fetch-depth: 0 | ||
token: ${{ secrets.PUSH_CORE_DOCS }} | ||
- name: Restore REST API Spec | ||
uses: actions/download-artifact@v2 | ||
with: | ||
name: doc-files | ||
- name: unzip phpdocumentor | ||
run: | | ||
unzip phpdocumentor.zip | ||
rm phpdocumentor.zip | ||
- name: List Files | ||
run: ls | ||
- name: Sync old files with newly generated ones. | ||
run: rsync -av docs/phpdocumentor/* . | ||
- name: Removed temp dirs | ||
run: rm -rf docs | ||
- name: Check if updates/changes. | ||
run: git status --porcelain > repo-changes.txt | ||
- name: Check changes file | ||
run: cat repo-changes.txt | ||
- name: Verify updates. | ||
id: allow-deploy | ||
run: | | ||
if [ -s repo-changes.txt ]; then echo "Updates made to documentation"; echo '::set-output name=DEPLOY::true'; else echo "No updates made to documentation deployment would be skipped."; echo '::set-output name=DEPLOY::false'; fi | ||
- name: Commit changes and deply | ||
if: ${{ steps.allow-deploy.outputs.DEPLOY == 'true' }} | ||
run: | | ||
rm repo-changes.txt | ||
git config user.name "github-actions" | ||
git config user.email "[email protected]" | ||
git add . | ||
git commit -s -m "phplist/core docs deployment `date`" | ||
git push |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use PhpList\Core\Core\Bootstrap; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,5 @@ | ||
<?php | ||
|
||
declare(strict_types=1); | ||
|
||
use PhpList\Core\Core\Bootstrap; | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.