From 67e406e3a567a1654c72f9561ec9b13a8d634f67 Mon Sep 17 00:00:00 2001 From: Brandon Barker Date: Sun, 31 Jan 2021 16:48:56 -0500 Subject: [PATCH] trying github actions --- .github/workflows/ci.yml | 15 +++++++++++++++ .github/workflows/deploy.yml | 23 +++++++++++++++++++++++ .travis.yml => .travis.yml_backup | 4 ++++ 3 files changed, 42 insertions(+) create mode 100755 .github/workflows/ci.yml create mode 100755 .github/workflows/deploy.yml rename .travis.yml => .travis.yml_backup (85%) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100755 index 0000000..b8ec211 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,15 @@ +# TODO: Dhall: https://gvolpe.github.io/blog/github-actions-nix-cachix-dhall/ + +name: "CI" +on: + pull_request: + push: +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + - uses: cachix/install-nix-action@v12 + with: + nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/0b8799ecaaf0dc6b4c11583a3c96ca5b40fcfdfb.tar.gz # in 20.09, Oct 9 2020 + - run: nix-shell -p spago nodejs purescript --command 'npm install && npm run build && npm run prod' diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml new file mode 100755 index 0000000..456a4af --- /dev/null +++ b/.github/workflows/deploy.yml @@ -0,0 +1,23 @@ +name: "Deploy" +on: + push: + branches: + - master +jobs: + buildDeploy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2.3.4 + - uses: cachix/install-nix-action@v12 + with: + # nix_path: nixpkgs=channel:nixos-20.09 + nix_path: nixpkgs=https://github.com/NixOS/nixpkgs/archive/0b8799ecaaf0dc6b4c11583a3c96ca5b40fcfdfb.tar.gz # in 20.09, Oct 9 2020 + - name: Build 👷 + run: nix-shell -p spago nodejs purescript --command 'IMG_VER=0.13.8_r2 ./scripts/dist_build.sh' + - name: Deploy 🚀 + uses: JamesIves/github-pages-deploy-action@3.7.1 + with: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + BRANCH: gh-pages # The branch the action should deploy to. + FOLDER: dist # The folder the action should deploy. + CLEAN: true # Automatically remove deleted files from the deploy branch diff --git a/.travis.yml b/.travis.yml_backup similarity index 85% rename from .travis.yml rename to .travis.yml_backup index f9d11ed..cf3f5c5 100644 --- a/.travis.yml +++ b/.travis.yml_backup @@ -1,3 +1,7 @@ +# +# # Note - now using github actions instead +# + language: minimal services: