Skip to content

Commit

Permalink
OpenVim resides in GitHub Pages
Browse files Browse the repository at this point in the history
  • Loading branch information
egaga committed Aug 16, 2024
1 parent 7d9d87b commit 77a0760
Show file tree
Hide file tree
Showing 6 changed files with 43 additions and 4 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/deploy-pages.yml
Original file line number Diff line number Diff line change
@@ -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
1 change: 1 addition & 0 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Here comes the production code.
2 changes: 1 addition & 1 deletion tutorial.html → index.html
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@

<body>
<div class="navigation">
<a href="tutorial.html" class="selected">Tutorial</a>
<a href="index.html" class="selected">Tutorial</a>
<a href="sandbox.html">Practice</a>
<a href="development.html">Development</a>
<!--
Expand Down
2 changes: 1 addition & 1 deletion problems.html
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@
<body>
<div class="navigation">
<a href="development.html">Home</a>
<a href="tutorial.html">Tutorial</a>
<a href="index.html">Tutorial</a>
<a href="problems.html" class="selected">Problems</a>
<a href="sandbox.html">Sandbox</a>
<a href="twosandboxes.html">Two sandboxes</a>
Expand Down
2 changes: 1 addition & 1 deletion sandbox.html
Original file line number Diff line number Diff line change
Expand Up @@ -55,7 +55,7 @@

<body>
<div class="navigation">
<a href="tutorial.html">Tutorial</a>
<a href="index.html">Tutorial</a>
<a href="sandbox.html" class="selected">Practice</a>
<a href="development.html">Development</a>
<!--
Expand Down
2 changes: 1 addition & 1 deletion twosandboxes.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@
<body>
<div class="navigation">
<a href="development.html">Home</a>
<a href="tutorial.html">Tutorial</a>
<a href="index.html">Tutorial</a>
<a href="sandbox.html">Sandbox</a>
<a href="twosandboxes.html" class="selected">Two sandboxes</a>
<a href="tests.html">Testing</a>
Expand Down

0 comments on commit 77a0760

Please sign in to comment.