Action to publish previews
This commit is contained in:
parent
718ff4f9e8
commit
60633f11e0
3 changed files with 33 additions and 4 deletions
25
.github/workflows/draft.yml
vendored
Normal file
25
.github/workflows/draft.yml
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
name: Publish a Release Preview
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
permissions:
|
||||
contents: write
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- uses: php-actions/composer@v6
|
||||
- run: |
|
||||
sudo apt-get install zip -y
|
||||
zip -r AntCMS.zip src
|
||||
- uses: ncipollo/release-action@v1
|
||||
with:
|
||||
artifacts: "AntCMS.zip"
|
||||
prerelease: true
|
||||
allowUpdates: true
|
||||
artifactErrorsFailBuild: true
|
||||
generateReleaseNotes: true
|
||||
name: "Preview Build"
|
1
.github/workflows/phpstan.yml
vendored
1
.github/workflows/phpstan.yml
vendored
|
@ -17,4 +17,3 @@ jobs:
|
|||
with:
|
||||
configuration: phpstan.neon
|
||||
memory_limit: 256M
|
||||
|
||||
|
|
|
@ -38,7 +38,7 @@ class AntCMS
|
|||
$end_time = microtime(true);
|
||||
$elapsed_time = round($end_time - $start_time, 4);
|
||||
|
||||
if($currentConfig['debug']){
|
||||
if ($currentConfig['debug']) {
|
||||
$pageTemplate = str_replace('<!--AntCMS-Debug-->', '<p>Took ' . $elapsed_time . ' seconds to render the page. </p>', $pageTemplate);
|
||||
}
|
||||
|
||||
|
@ -88,7 +88,11 @@ class AntCMS
|
|||
$currentConfig = AntConfig::currentConfig();
|
||||
$themePath = antThemePath . '/' . $currentConfig['activeTheme'];
|
||||
$themeContent['default_layout'] = file_get_contents($themePath . '/default_layout.html');
|
||||
$themeContent['nav_layout'] = file_get_contents($themePath . '/nav_layout.html') ?? '';
|
||||
$themeContent['nav_layout'] = file_get_contents($themePath . '/nav_layout.html');
|
||||
|
||||
if (!$themeContent['nav_layout']) {
|
||||
$themeContent['default_layout'] = '';
|
||||
}
|
||||
|
||||
if (!$themeContent['default_layout']) {
|
||||
$themeContent['default_layout'] = '
|
||||
|
@ -143,7 +147,8 @@ class AntCMS
|
|||
return $pageHeaders;
|
||||
}
|
||||
|
||||
public static function getSiteInfo(){
|
||||
public static function getSiteInfo()
|
||||
{
|
||||
$currentConfig = AntConfig::currentConfig();
|
||||
return $currentConfig['SiteInfo'];
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue