Skip to content

Commit

Permalink
Move the documentation to the GitHub wiki
Browse files Browse the repository at this point in the history
  • Loading branch information
cedx committed Jun 15, 2024
1 parent 4b8d17d commit 7b28a3b
Show file tree
Hide file tree
Showing 15 changed files with 5 additions and 291 deletions.
25 changes: 0 additions & 25 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -17,28 +17,3 @@ jobs:
uses: ramsey/composer-install@v3
- name: Run tests
run: composer test
deploy:
needs: test
runs-on: ubuntu-latest
steps:
- name: Fetch sources
uses: actions/checkout@v4
- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
coverage: none
extensions: curl, intl, mbstring, simplexml
php-version: 8.3
- name: Set up Python
uses: actions/setup-python@v5
with:
cache: pip
python-version: 3.12
- name: Install dependencies
run: |
curl --location --output var/castor.phar https://github.com/jolicode/castor/releases/latest/download/castor.linux-amd64.phar
pip install --requirement=etc/requirements.txt
- name: Deploy documentation
run: |
php var/castor.phar doc
mkdocs gh-deploy --config-file=etc/mkdocs.yaml --force
3 changes: 1 addition & 2 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,8 +1,7 @@
/**/.DS_Store
/.castor.stub.php
/.idea/
/docs/api/
/etc/http-client.private.env.json
/var/
/vendor/
/www/
/wiki/
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,11 @@ Parse and format [LCOV](https://github.com/linux-test-project/lcov) coverage rep
in [PHP](https://www.php.net).

## Documentation
- [User guide](https://docs.belin.io/lcov.php)
- [API reference](https://docs.belin.io/lcov.php/api)
- [User guide](https://github.com/cedx/lcov.php/wiki)
- [Examples](https://github.com/cedx/lcov.php/tree/main/example)

## Development
- [Git repository](https://github.com/cedx/lcov.php)
- [Packagist package](https://packagist.org/packages/cedx/lcov)
- [Submit an issue](https://github.com/cedx/lcov.php/issues)

## License
Expand Down
24 changes: 1 addition & 23 deletions castor.php
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
<?php
use Castor\Attribute\{AsContext, AsTask};
use Castor\Context;
use function Castor\{exit_code, finder, fs, http_download, run, variable};
use function Castor\{exit_code, finder, fs, run, variable};

#[AsContext(default: true)]
function context(): Context {
Expand All @@ -14,22 +14,6 @@ function clean(): void {
fs()->remove("www");
}

#[AsTask(description: "Builds the documentation")]
function doc(): void {
foreach (["CHANGELOG.md", "LICENSE.md"] as $file) fs()->copy($file, "docs/".mb_strtolower($file));

$pkg = variable("package");
file_put_contents(
$file = "etc/phpdoc.xml",
preg_replace('/version number="\d+(\.\d+){2}"/', "version number=\"$pkg->version\"", file_get_contents($file))
);

fs()->remove("docs/api");
http_download("https://phpdoc.org/phpDocumentor.phar", "var/phpDocumentor.phar");
run("php var/phpDocumentor.phar --config=etc/phpdoc.xml");
fs()->copy("docs/favicon.ico", "docs/api/images/favicon.ico");
}

#[AsTask(description: "Performs the static analysis of source code")]
function lint(): int {
return exit_code("php vendor/bin/phpstan analyse --configuration=etc/phpstan.php --memory-limit=256M --verbose");
Expand All @@ -41,12 +25,6 @@ function publish(): void {
foreach (["tag", "push origin"] as $action) run("git $action v$pkg->version");
}

#[AsTask(description: "Starts the development server")]
function serve(): void {
doc();
run("mkdocs serve --config-file=etc/mkdocs.yaml");
}

#[AsTask(description: "Runs the test suite")]
function test(): int {
return exit_code("php vendor/bin/phpunit --configuration=etc/phpunit.xml");
Expand Down
2 changes: 1 addition & 1 deletion composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@
"test": "phpunit --configuration=etc/phpunit.xml"
},
"support": {
"docs": "https://docs.belin.io/lcov.php",
"docs": "https://github.com/cedx/lcov.php/wiki",
"issues": "https://github.com/cedx/lcov.php/issues"
}
}
Binary file removed docs/favicon.ico
Binary file not shown.
1 change: 0 additions & 1 deletion docs/favicon.svg

This file was deleted.

18 changes: 0 additions & 18 deletions docs/index.md

This file was deleted.

36 changes: 0 additions & 36 deletions docs/installation.md

This file was deleted.

4 changes: 0 additions & 4 deletions docs/styles.css

This file was deleted.

37 changes: 0 additions & 37 deletions docs/usage/formatting.md

This file was deleted.

56 changes: 0 additions & 56 deletions docs/usage/parsing.md

This file was deleted.

62 changes: 0 additions & 62 deletions etc/mkdocs.yaml

This file was deleted.

22 changes: 0 additions & 22 deletions etc/phpdoc.xml

This file was deleted.

1 change: 0 additions & 1 deletion etc/requirements.txt

This file was deleted.

0 comments on commit 7b28a3b

Please sign in to comment.