-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'dev-github-actions' into src. Close #54.
- Loading branch information
Showing
12 changed files
with
91 additions
and
57 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,43 @@ | ||
name: Publish web | ||
on: | ||
push: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v4 | ||
|
||
- name: Setup Pages | ||
id: pages | ||
uses: actions/configure-pages@v3 | ||
|
||
- name: Install pandoc | ||
run: | | ||
sudo apt-get install --yes pandoc | ||
- name: Build with Pandoc | ||
run: | | ||
make | ||
- name: Upload artifact | ||
uses: actions/upload-pages-artifact@v2 | ||
|
||
deploy: | ||
permissions: | ||
contents: read | ||
pages: write | ||
id-token: write | ||
|
||
runs-on: ubuntu-latest | ||
|
||
needs: build | ||
|
||
environment: | ||
name: github-pages | ||
url: ${{steps.deployment.outputs.page_url}} | ||
steps: | ||
- name: Deploy artifact | ||
id: deployment | ||
uses: actions/deploy-pages@v1 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,21 +1,26 @@ | ||
MAP=map | ||
OUT=html | ||
TEMPLATE=tpl/default | ||
.PHONY: all | ||
|
||
include Makefile.base | ||
all: _site/about.html \ | ||
_site/contact.html \ | ||
_site/documentation.html \ | ||
_site/download.html \ | ||
_site/home.html \ | ||
_site/index.html | ||
|
||
publish: all | ||
git add . | ||
git stash | ||
git checkout master | ||
git checkout --theirs stash -- . | ||
git stash drop | ||
git reset . | ||
git clean -df | ||
git clean -df | ||
_site/about.html: about.md | ||
./compile.sh About $< default | ||
|
||
home.html: home.nav home.content tpl/home | ||
web-render tpl/home home home.nav home.content > $@ | ||
_site/contact.html: contact.md | ||
./compile.sh Contact $< default | ||
|
||
index.html: home.html | ||
ln -s $< $@ | ||
_site/documentation.html: documentation.md | ||
./compile.sh Documentation $< default | ||
|
||
_site/download.html: download.md | ||
./compile.sh Download $< default | ||
|
||
_site/home.html: home.md | ||
./compile.sh Home $< home | ||
|
||
_site/index.html: _site/home.html | ||
cp $< $@ |
This file was deleted.
Oops, something went wrong.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
#!/bin/bash | ||
|
||
TITLE="$1" | ||
NAV="$(cat nav)" | ||
CONTENT="$(pandoc $2 -t html)" | ||
TARGET="_site/$(basename $2 .md).html" | ||
TEMPLATE="$3" | ||
mkdir -p _site/ | ||
env TITLE="$TITLE" NAV="$NAV" CONTENT="$CONTENT" envsubst '${TITLE}':'${NAV}':'${CONTENT}' < tpl/$TEMPLATE > $TARGET |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
<p> | ||
<a href="home.html">Home</a> | ||
<a href="about.html">About</a> | ||
<a href="download.html">Download</a> | ||
<a href="documentation.html">Documentation</a> | ||
<a href="contact.html">Contact</a> | ||
<a href="https://github.com/copilot-language/copilot">Source Code</a> | ||
</p> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,3 @@ | ||
#!/bin/sh | ||
|
||
cat <<! | ||
<!DOCTYPE html> | ||
<html> | ||
<head> | ||
|
@@ -21,4 +18,3 @@ cat <<! | |
</div> | ||
</body> | ||
</html> | ||
! |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters