Skip to content

Commit fc9b00b

Browse files
committed
OpenVim resides in GitHub Pages
1 parent 7d9d87b commit fc9b00b

File tree

6 files changed

+44
-5
lines changed

6 files changed

+44
-5
lines changed

.github/workflows/deploy-pages.yml

+38
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,38 @@
1+
name: "Deploy to GitHub pages"
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
- github-pages
8+
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: write
13+
14+
concurrency:
15+
group: "pages"
16+
cancel-in-progress: false
17+
18+
jobs:
19+
build-and-deploy:
20+
runs-on: ubuntu-latest
21+
steps:
22+
- uses: actions/checkout@v3
23+
- name: Echo version
24+
run: |
25+
version=$(git rev-parse HEAD)
26+
echo "Replacing version number in *.html with $version"
27+
- name: Replace version
28+
run: |
29+
mkdir production
30+
cp -R -v *.html css js production
31+
version=$(git rev-parse HEAD)
32+
echo "Replacing version number in *.html with $version"
33+
perl -pi -e 's/{VERSION}/'$version'/g' production/*.html
34+
- name: Deploy to GitHub Pages
35+
id: deployment
36+
uses: JamesIves/github-pages-deploy-action@v4
37+
with:
38+
folder: ./production

docs/README.md

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
Here comes the production code.

tutorial.html index.html

+2-2
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@
88
<link rel="stylesheet" type="text/css" href="css/virtual_keyboard.css?version={VERSION}" />
99
<link rel="icon" type="image/png" href="icon.png"/>
1010

11-
<title>Interactive Vim tutorial</title>
11+
<title>OpenVim - Interactive Vim tutorial</title>
1212

1313
<!-- GENERAL (mostly) -->
1414
<script type="text/Javascript" src="js/engine/messager.js?version={VERSION}"></script>
@@ -58,7 +58,7 @@
5858

5959
<body>
6060
<div class="navigation">
61-
<a href="tutorial.html" class="selected">Tutorial</a>
61+
<a href="index.html" class="selected">Tutorial</a>
6262
<a href="sandbox.html">Practice</a>
6363
<a href="development.html">Development</a>
6464
<!--

problems.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -54,7 +54,7 @@
5454
<body>
5555
<div class="navigation">
5656
<a href="development.html">Home</a>
57-
<a href="tutorial.html">Tutorial</a>
57+
<a href="index.html">Tutorial</a>
5858
<a href="problems.html" class="selected">Problems</a>
5959
<a href="sandbox.html">Sandbox</a>
6060
<a href="twosandboxes.html">Two sandboxes</a>

sandbox.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -55,7 +55,7 @@
5555

5656
<body>
5757
<div class="navigation">
58-
<a href="tutorial.html">Tutorial</a>
58+
<a href="index.html">Tutorial</a>
5959
<a href="sandbox.html" class="selected">Practice</a>
6060
<a href="development.html">Development</a>
6161
<!--

twosandboxes.html

+1-1
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@
5050
<body>
5151
<div class="navigation">
5252
<a href="development.html">Home</a>
53-
<a href="tutorial.html">Tutorial</a>
53+
<a href="index.html">Tutorial</a>
5454
<a href="sandbox.html">Sandbox</a>
5555
<a href="twosandboxes.html" class="selected">Two sandboxes</a>
5656
<a href="tests.html">Testing</a>

0 commit comments

Comments
 (0)