Skip to content

Commit

Permalink
Initial commit
Browse files Browse the repository at this point in the history
  • Loading branch information
dianaiusan authored Jun 3, 2024
0 parents commit ed4f70e
Show file tree
Hide file tree
Showing 56 changed files with 2,056 additions and 0 deletions.
69 changes: 69 additions & 0 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
# Zola build workflow.

# Prerequisites:
# - zola writes output to public/
# - variables below set correctly
#
# Setting it up:
# It is a general limitation of gh-actions that they cannot make the very first
# deploy to gh-pages. It will seem to work, but not appear on the CDN to be
# online. You need to go to settings and set the gh-pages branch, then future
# deploys will work. See
# https://github.com/marketplace/actions/github-pages-action#%EF%B8%8F-first-deployment-with-github_token

name: Build/deploy website

env:
ZOLA_VERSION: "0.17.2"
MAIN_BRANCH: "main"
TARGET_BRANCH: "gh-pages"
# CNAME: "example.org"

on:
push:
branches:
- main
pull_request:
branches:
- main

permissions:
contents: write

jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Checkout repository and submodules
uses: actions/checkout@v4
with:
submodules: recursive
- name: Install zola
run: |
set -x
wget -O - \
"https://github.com/getzola/zola/releases/download/v${ZOLA_VERSION}/zola-v${ZOLA_VERSION}-x86_64-unknown-linux-gnu.tar.gz" \
| sudo tar xzf - -C /usr/local/bin
- name: Generate HTML
run: zola build
# Add CNAME, either (first one used)
# - file in the root
# - the environment variable set above
- name: add CNAME
run: |
if [ -f CNAME ] ; then
mv CNAME public/
echo "Copied CNAME from repository root"
exit 0
fi
if [ -n ${{ env.CNAME }} ] ; then
echo -n ${{ env.CNAME }} > public/CNAME
echo "Used CNAME from the action workflow file"
fi
- name: Deploy to gh-pages
if: ${{ github.event_name == 'push' && github.ref == format('refs/heads/{0}', env.MAIN_BRANCH) }}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: true
3 changes: 3 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
*~
public/
static/processed_images/
3 changes: 3 additions & 0 deletions .gitmodules
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
[submodule "uikit"]
path = uikit
url = [email protected]:uikit/uikit.git
Loading

0 comments on commit ed4f70e

Please sign in to comment.