-
Notifications
You must be signed in to change notification settings - Fork 15
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ENH Prepare codebase to migrate to GitHub Pages #127
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,61 @@ | ||
name: Deploy to GitHub pages | ||
|
||
on: | ||
push: | ||
branches: [ "master" ] | ||
workflow_dispatch: | ||
|
||
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued. | ||
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete. | ||
concurrency: | ||
group: "gh-pages" | ||
cancel-in-progress: false | ||
|
||
permissions: {} | ||
|
||
jobs: | ||
build: | ||
name: Build site | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'silverstripe' | ||
permissions: | ||
contents: read | ||
steps: | ||
- name: Install PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: 8.1 | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup GH pages | ||
id: pages | ||
uses: actions/configure-pages@v5 | ||
|
||
- name: Build static files | ||
shell: bash | ||
run: | | ||
composer install | ||
./makedoc.sh | ||
|
||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v3 | ||
with: | ||
path: "htdocs/" | ||
|
||
deploy: | ||
name: Deploy site | ||
needs: build | ||
runs-on: ubuntu-latest | ||
if: github.repository_owner == 'silverstripe' | ||
permissions: | ||
pages: write | ||
id-token: write | ||
environment: | ||
name: github-pages | ||
url: ${{steps.deployment.outputs.page_url}} | ||
steps: | ||
- name: Deploy to GitHub Pages | ||
id: deployment | ||
uses: actions/deploy-pages@v4 |
This file was deleted.
This file was deleted.
This file was deleted.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ | |
"4": "4.x", | ||
"3": "3.x" | ||
}, | ||
"default_version": "5", | ||
"paths": { | ||
"www": "htdocs", | ||
"cache": "data/cache", | ||
|
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -2,13 +2,13 @@ | |
|
||
use PhpParser\NodeTraverser; | ||
use PhpParser\NodeVisitor\NameResolver; | ||
use Doctum\Project; | ||
use Doctum\Doctum; | ||
use SilverStripe\ApiDocs\Data\ApiJsonStore; | ||
use SilverStripe\ApiDocs\Data\Config; | ||
use SilverStripe\ApiDocs\Inspections\RecipeFinder; | ||
use SilverStripe\ApiDocs\Inspections\RecipeVersionCollection; | ||
use SilverStripe\ApiDocs\RemoteRepository\SilverStripeRemoteRepository; | ||
use SilverStripe\ApiDocs\SilverstripeProject; | ||
|
||
// Get config | ||
$config = Config::getConfig(); | ||
|
@@ -70,7 +70,7 @@ | |
// Override project | ||
unset($doctum['project']); | ||
$doctum['project'] = function ($sc) { | ||
$project = new Project($sc['store'], $sc['_versions'], array( | ||
$project = new SilverstripeProject($sc['store'], $sc['_versions'], array( | ||
'build_dir' => $sc['build_dir'], | ||
'cache_dir' => $sc['cache_dir'], | ||
'remote_repository' => $sc['remote_repository'], | ||
|
@@ -82,6 +82,7 @@ | |
'source_dir' => $sc['source_dir'], | ||
'insert_todos' => $sc['insert_todos'], | ||
'base_url' => $sc['base_url'], | ||
'favicon' => '/favicon.ico', | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. How did we not have this until now lol |
||
'footer_link' => [ | ||
'href' => 'https://github.com/silverstripe/api.silverstripe.org', | ||
'rel' => 'noreferrer noopener', | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The files referenced here don't exist