Skip to content

docs

docs #989

Workflow file for this run

name: "CI"
on:
push:
branches:
- "*"
pull_request:
jobs:
build:
runs-on: self-hosted
steps:
- uses: actions/checkout@v4
- name: Build Nix
id: build-nix
run: |
nix run github:srid/nixci
- name: Check closure size
run: |
nix run .#check-closure-size
- name: Build as docker img
id: build
run: |
nix build -j auto -o docker-img .#dockerImage
# docker
export DOCKERIMG=$(readlink ./docker-img)
echo "::set-output name=docker-img::${DOCKERIMG}"
- name: Upload docker image tgz
uses: actions/upload-artifact@v4
if: github.ref == 'refs/heads/master'
with:
name: docker-img
retention-days: 1
path: |
${{ steps.build.outputs.docker-img }}
docker:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
env:
DOCKERTAG: latest
steps:
- name: Download docker img
uses: actions/download-artifact@v4
with:
name: docker-img
- name: Load Docker img
run: |
docker load -i *docker-image-emanote.tar.gz
- name: Publish Docker image to Docker Hub
run: |
echo ${{ secrets.DOCKER_PASS }} | docker login -u sridca --password-stdin
set -x
docker push sridca/emanote:latest
website:
needs: build
runs-on: ubuntu-latest
if: github.ref == 'refs/heads/master'
steps:
- uses: actions/checkout@v4
- name: Download docker image
uses: actions/download-artifact@v4
with:
name: docker-img
- name: Load Docker image
run: |
docker load -i *docker-image-emanote.tar.gz
- name: Generate website HTML 🔧
run: |
mkdir -p ./docs/.ci/output
# demo.md has broken links for demo
docker run \
-e LANG=C.UTF-8 -e LC_ALL=C.UTF-8 \
-v $PWD/docs:/data \
--tmpfs /tmp \
sridca/emanote emanote --layers /data --allow-broken-links gen /data/.ci/output
cp -r ./docs/.ci .
- name: Deploy to website to gh-pages 🚀
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: .ci/output
cname: emanote.srid.ca