-
-
Notifications
You must be signed in to change notification settings - Fork 344
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
4 changed files
with
132 additions
and
0 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 |
---|---|---|
@@ -0,0 +1,96 @@ | ||
name: build-doctum-docs | ||
|
||
on: | ||
# Runs on pushes targeting the default branch | ||
push: | ||
branches: ["doctum-test"] | ||
|
||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
name: Update-DoctumDocs-Branch | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: build doctum docs | ||
uses: sudo-bot/action-doctum@v5 | ||
with: | ||
config-file: doctum-config.php | ||
# parse, render or update | ||
method: "update" | ||
# (optional) defaults to '--output-format=github --no-ansi --no-progress -v' | ||
cli-args: "--output-format=github --no-ansi --no-progress -v" | ||
|
||
- name: Remove Unrelated Files | ||
run: | | ||
rm -rf database | ||
rm -rf config | ||
rm -rf docs | ||
rm -rf public | ||
rm -rf resources | ||
rm -rf src | ||
rm -rf tests | ||
rm psalm.xml.dist | ||
rm phpunit.xml.dist | ||
rm phpstan.neon | ||
rm coverage.xml | ||
rm composer.json | ||
rm codecov.yml | ||
rm doctum-config.php | ||
rm .editorconfig | ||
- name: Move New Docs To docs | ||
run: | | ||
cp -R doctum/build docs | ||
- name: Git Add | ||
run: | | ||
git add docs | ||
- uses: stefanzweifel/git-auto-commit-action@v4 | ||
with: | ||
# Optional. Commit message for the created commit. | ||
# Defaults to "Apply automatic changes" | ||
commit_message: Automated Change | ||
|
||
# Optional. Options used by `git-commit`. | ||
# See https://git-scm.com/docs/git-commit#_options | ||
commit_options: '--no-verify --signoff' | ||
|
||
# Optional. Option used by `git-status` to determine if the repository is | ||
# dirty. See https://git-scm.com/docs/git-status#_options | ||
status_options: '--untracked-files=yes' | ||
|
||
# Optional. Local and remote branch name where commit is going to be pushed | ||
# to. Defaults to the current branch. | ||
# You might need to set `create_branch: true` if the branch does not exist. | ||
branch: doctum-docs-latest | ||
|
||
# Optional. Options used by `git-add`. | ||
# See https://git-scm.com/docs/git-add#_options | ||
add_options: '-u' | ||
|
||
# Optional. Disable dirty check and always try to create a commit and push | ||
skip_dirty_check: true | ||
|
||
# Optional. Skip internal call to `git fetch` | ||
skip_fetch: true | ||
|
||
# Optional. Skip internal call to `git checkout` | ||
skip_checkout: true | ||
|
||
# Optional. Options used by `git-push`. | ||
# See https://git-scm.com/docs/git-push#_options | ||
push_options: '--force' | ||
|
||
# Optional commit user and author settings | ||
commit_user_name: My GitHub Actions Bot # defaults to "github-actions[bot]" | ||
commit_user_email: my-github-actions-bot@example.org # defaults to "41898282+github-actions[bot]@users.noreply.github.com" | ||
commit_author: Author <actions@github.com> # defaults to author of the commit that triggered the run | ||
create_branch: true |
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 |
---|---|---|
|
@@ -19,3 +19,4 @@ phpunit.xml.dist.dev | |
.env | ||
phpunit.xml.bak | ||
phpstan.txt | ||
doctum |
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 |
---|---|---|
@@ -0,0 +1,34 @@ | ||
<?php | ||
|
||
use Doctum\Doctum; | ||
use Doctum\RemoteRepository\GitHubRemoteRepository; | ||
use Doctum\Version\GitVersionCollection; | ||
use Symfony\Component\Finder\Finder; | ||
|
||
$dir = './src'; | ||
|
||
$iterator = Finder::create() | ||
->files() | ||
->name('*.php') | ||
->exclude('Resources') | ||
->exclude('Tests') | ||
->in($dir); | ||
|
||
// generate documentation for all v2.0.* tags, the 2.0 branch, and the main one | ||
$versions = GitVersionCollection::create($dir) | ||
// In a non case-sensitive way, tags containing "PR", "RC", "BETA" and "ALPHA" will be filtered out | ||
// To change this, use: `$versions->setFilter(static function (string $version): bool { // ... });` | ||
->add('doctum-test', 'doctum-test branch') | ||
->addFromTags('v3.*') | ||
->addFromTags('v2.*') | ||
->addFromTags('v1.*'); | ||
|
||
return new Doctum($iterator, [ | ||
'versions' => $versions, | ||
'title' => 'Rappasoft - Laravel Livewire Tables', | ||
'build_dir' => __DIR__.'/doctum/build/%version%', | ||
'cache_dir' => __DIR__.'/doctum/cache/%version%', | ||
'source_dir' => dirname($dir).'/', | ||
'remote_repository' => new GitHubRemoteRepository('rappasoft/laravel-livewire-tables', dirname($dir)), | ||
'default_opened_level' => 2, // optional, 2 is the default value | ||
]); |