diff --git a/.github/workflows/Deploy.yml b/.github/workflows/Deploy.yml new file mode 100644 index 0000000..b72dc89 --- /dev/null +++ b/.github/workflows/Deploy.yml @@ -0,0 +1,47 @@ +name: Build and Deploy +on: + push: + branches: + - main + - master +jobs: + build-and-deploy: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + # NOTE: Python is necessary for the pre-rendering (minification) step + - name: Install python + uses: actions/setup-python@v2 + with: + python-version: '3.8' + # NOTE: Here you can install dependencies such as matplotlib if you use + # packages such as PyPlot. + # - run: pip install matplotlib + - name: Install Julia + uses: julia-actions/setup-julia@v1 + with: + version: '1' # Latest stable Julia release. + # NOTE + # The steps below ensure that NodeJS and Franklin are loaded then it + # installs highlight.js which is needed for the prerendering step + # (code highlighting + katex prerendering). + # Then the environment is activated and instantiated to install all + # Julia packages which may be required to successfully build your site. + # The last line should be `optimize()` though you may want to give it + # specific arguments, see the documentation or ?optimize in the REPL. + - run: julia -e ' + using Pkg; Pkg.activate("."); Pkg.instantiate(); + using NodeJS; run(`$(npm_cmd()) install highlight.js`); + using Franklin; + optimize()' + - name: Build and Deploy + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages + FOLDER: __site diff --git a/.gitignore b/.gitignore index ae90590..e14ddf7 100644 --- a/.gitignore +++ b/.gitignore @@ -1,25 +1,4 @@ -# Files generated by invoking Julia with --code-coverage -*.jl.cov -*.jl.*.cov - -# Files generated by invoking Julia with --track-allocation -*.jl.mem - -# System-specific files and directories generated by the BinaryProvider and BinDeps packages -# They contain absolute paths specific to the host computer, and so should not be committed -deps/deps.jl -deps/build.log -deps/downloads/ -deps/usr/ -deps/src/ - -# Build artifacts for creating documentation generated by the Documenter package -docs/build/ -docs/site/ - -# File generated by Pkg, the package manager, based on a corresponding Project.toml -# It records a fixed state of all packages used by the project. As such, it should not be -# committed for packages, but should be committed for applications that require a static -# environment. -Manifest.toml +__site/ .DS_Store +node_modules/ +package-lock.json diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..dbb80d8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,20 @@ +image: julia:1.6 + +before_script: + - apt-get -qq update; apt-get -y install git python3-dev python3-pip + - pip3 install css-html-js-minify + +pages: + stage: deploy + script: + - julia --project=@. -e 'import Pkg; Pkg.instantiate(); + using NodeJS; run(`$(npm_cmd()) install highlight.js`); + using Franklin; + optimize()' + - mv __site public + artifacts: + paths: + - public + only: + - main + diff --git a/404.html b/404.html deleted file mode 100644 index 4600fc4..0000000 --- a/404.html +++ /dev/null @@ -1,78 +0,0 @@ - - -
- - - - - - - - - - -