From 115962aed1d49e4e1d27e97128c77f9d1655a538 Mon Sep 17 00:00:00 2001 From: Eduardo Cueto Mendoza Date: Sat, 13 Jun 2020 10:55:56 -0600 Subject: [PATCH] Initial commit --- .github/workflows/deploy.yml | 64 ++++++++++++++++++++++++++++++++++++ .gitlab-ci.yml | 9 +++++ 2 files changed, 73 insertions(+) create mode 100644 .github/workflows/deploy.yml create mode 100644 .gitlab-ci.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100644 index 0000000..42e5a24 --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,64 @@ +name: Build and Deploy +on: + push: + # NOTE: + # For a **project** site (username.github.io/project/), push things + # to the **master** branch and make sure to set the line below to + # ` - master`; also, at the end of the file, change to `BRANCH: gh-pages` + # + # For a **personal** site (username.github.io/), push things to a **dev** + # branch and make sure to set the line below to `- dev` this is + # because for user pages GitHub pages **requires** the deployment to be + # on the master branch; also, at the end of the file, change to + # `BRANCH: master` + branches: + - master +jobs: + build-and-deploy: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v2 + with: + persist-credentials: false + - name: Install SSH Client + continue-on-error: true + uses: webfactory/ssh-agent@v0.2.0 + with: + ssh-private-key: ${{ secrets.FRANKLIN_PRIV }} + # NOTE + # Python is necessary for pre-rendering steps as well as to install + # matplotlib which is necessary if you intend to use PyPlot. If you do + # not, then you can remove the `run: pip install matplotlib` line. + - name: Install python + uses: actions/setup-python@v1 + with: + python-version: '3.x' + - run: pip install matplotlib # if you use PyPlot this is needed + - name: Install Julia + uses: julia-actions/setup-julia@v1 + with: + version: 1.4.1 + # NOTE + # The steps below ensure that NodeJS and Franklin are loaded then it + # installs highlight.js which is needed for the prerendering step. + # 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.add(["NodeJS", "Franklin"]); + using NodeJS; run(`$(npm_cmd()) install highlight.js`); + using Franklin; + Pkg.activate("."); Pkg.instantiate(); + optimize()' + - name: Build and Deploy + uses: JamesIves/github-pages-deploy-action@releases/v3 + with: + SSH: true + # NOTE + # Set this to `BRANCH: gh-pages` for a **project** page and to + # `BRANCH: master` for a **personal** page + BRANCH: gh-pages + FOLDER: __site diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..c26e6c8 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,9 @@ +pages: + stage: deploy + script: + - mv __site public + artifacts: + paths: + - public + only: + - master