From 77a07602aabd124f07fb786c3178c350614ca51f Mon Sep 17 00:00:00 2001 From: Henrik Huttunen Date: Fri, 16 Aug 2024 14:19:44 +0300 Subject: [PATCH] OpenVim resides in GitHub Pages --- .github/workflows/deploy-pages.yml | 38 ++++++++++++++++++++++++++++++ docs/README.md | 1 + tutorial.html => index.html | 2 +- problems.html | 2 +- sandbox.html | 2 +- twosandboxes.html | 2 +- 6 files changed, 43 insertions(+), 4 deletions(-) create mode 100644 .github/workflows/deploy-pages.yml create mode 100644 docs/README.md rename tutorial.html => index.html (98%) diff --git a/.github/workflows/deploy-pages.yml b/.github/workflows/deploy-pages.yml new file mode 100644 index 0000000..55adb1b --- /dev/null +++ b/.github/workflows/deploy-pages.yml @@ -0,0 +1,38 @@ +name: "Deploy to GitHub pages" + +on: + push: + branches: + - main + - github-pages + + workflow_dispatch: + +permissions: + contents: write + +concurrency: + group: "pages" + cancel-in-progress: false + +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - name: Echo version + run: | + version=$(git rev-parse HEAD) + echo "Replacing version number in *.html with $version" + - name: Replace version + run: | + mkdir production + cp -R -v *.html css js production + version=$(git rev-parse HEAD) + echo "Replacing version number in *.html with $version" + perl -pi -e 's/{VERSION}/'$version'/g' production/*.html + - name: Deploy to GitHub Pages + id: deployment + uses: JamesIves/github-pages-deploy-action@v4 + with: + folder: ./production diff --git a/docs/README.md b/docs/README.md new file mode 100644 index 0000000..dca74eb --- /dev/null +++ b/docs/README.md @@ -0,0 +1 @@ +Here comes the production code. diff --git a/tutorial.html b/index.html similarity index 98% rename from tutorial.html rename to index.html index 213e2d7..98a81ed 100644 --- a/tutorial.html +++ b/index.html @@ -58,7 +58,7 @@