From 8adeeab66d906cafb27b09d98342adc5c264fab9 Mon Sep 17 00:00:00 2001 From: Anton Shevchuk Date: Mon, 10 Jul 2023 16:52:35 +0200 Subject: [PATCH] Try to build Action --- .github/workflows/pages.yml | 24 +++++++++++++++++++++++- 1 file changed, 23 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pages.yml b/.github/workflows/pages.yml index d9ae9d9..60a5460 100644 --- a/.github/workflows/pages.yml +++ b/.github/workflows/pages.yml @@ -1,4 +1,4 @@ -# Simple workflow for deploying static content to GitHub Pages +# Workflow for generate and deploy static content to GitHub Pages name: Deploy static content to Pages on: @@ -31,8 +31,30 @@ jobs: steps: - name: Checkout uses: actions/checkout@v3 + - name: Setup Node + uses: actions/setup-node@v3 + with: + node-version: "18" + cache: npm - name: Setup Pages uses: actions/configure-pages@v3 + - name: Install dependencies + run: npm ci + - name: Generate HTML files from asciidoc + run: npm run build *.adoc */*.adoc + - name: List of the result HTML files + run: find . -type f -not -path '*/\.*' -not -path '*/node_modules/*' -name "*.html" + - name: Prepare directory with resources for web + run: mkdir .public + - run: cp -r javascripts .public + - run: cp -r stylesheets .public + - run: cp -r node_modules/reveal.js .public/javascripts + - name: Copy all HTML files + run: find . -type f -not -path '*/\.*' -not -path './node_modules/*' -not -path './common/*' -name "*.html" -exec cp --parents -t "./.public" {} + + - name: Copy all images directories + run: find . -type d -name "images" -not -path '*/\.*' -not -path './node_modules/*' -exec cp -r --parents -t "./.public" {} + + - run: mv .public public + - run: ls -la ./public - name: Upload artifact uses: actions/upload-pages-artifact@v1 with: