From 20927485d9ea3037b0671cf9bf3c4faf57c27bc2 Mon Sep 17 00:00:00 2001 From: despiegk Date: Fri, 7 Feb 2025 12:13:39 +0300 Subject: [PATCH] ... --- .github/workflows/documentation.yml | 1 + doc.vsh | 29 +++++++++++++++++++++++++++++ 2 files changed, 30 insertions(+) diff --git a/.github/workflows/documentation.yml b/.github/workflows/documentation.yml index 245e2d7b..0b806310 100644 --- a/.github/workflows/documentation.yml +++ b/.github/workflows/documentation.yml @@ -18,6 +18,7 @@ concurrency: jobs: deploy-documentation: environment: + if: startsWith(github.ref, 'refs/tags/') name: github-pages url: ${{ steps.deployment.outputs.page_url }} runs-on: ubuntu-latest diff --git a/doc.vsh b/doc.vsh index dae8f173..099a1c52 100755 --- a/doc.vsh +++ b/doc.vsh @@ -61,4 +61,33 @@ $if !linux { } } +// Create Jekyll required files +println('Creating Jekyll files...') +os.mkdir_all('docs/assets/css') or {} + +// Create style.scss +style_content := '---\n---\n\n@import "{{ site.theme }}";' +os.write_file('docs/assets/css/style.scss', style_content) or { + panic('Failed to create style.scss: ${err}') +} + +// Create _config.yml +config_content := 'title: HeroLib Documentation +description: Documentation for the HeroLib project +theme: jekyll-theme-primer +baseurl: /herolib + +exclude: + - Gemfile + - Gemfile.lock + - node_modules + - vendor/bundle/ + - vendor/cache/ + - vendor/gems/ + - vendor/ruby/' + +os.write_file('docs/_config.yml', config_content) or { + panic('Failed to create _config.yml: ${err}') +} + println('Documentation generation completed successfully!')