Skip to content

Instantly share code, notes, and snippets.

@kim366
Created February 27, 2021 19:17
Show Gist options
  • Save kim366/ce38f6f8d5d6716df0dd86699204ed56 to your computer and use it in GitHub Desktop.
Save kim366/ce38f6f8d5d6716df0dd86699204ed56 to your computer and use it in GitHub Desktop.
name: CI
on:
push:
branches-ignore:
- dist-preview
- dist
jobs:
build:
runs-on: ubuntu-latest
timeout-minutes: 5
env:
FIREBASE_API_KEY: xxx
steps:
- uses: actions/checkout@v2
- name: Set up a PureScript toolchain
uses: purescript-contrib/setup-purescript@main
with:
purescript: "0.13.8"
- name: Set up Node.js
uses: actions/setup-node@v2
with:
node-version: "12.18.4"
- name: Set up Zephyr
run: |
wget https://github.com/coot/zephyr/releases/download/v0.3.2/Linux.tar.gz
tar -xf Linux.tar.gz
echo "$(pwd)/zephyr" > zephyrpath
- name: Cache PureScript dependencies
uses: actions/cache@v2
with:
key: ${{ runner.os }}-spago-${{ hashFiles('**/*.dhall') }}
path: |
.spago
- name: Install npm dependencies
run: npm ci
- name: Install PureScript dependencies
run: spago install
- name: Run tests
run: spago test --no-install
# - name: Setup tmate session
# uses: mxschmitt/action-tmate@v3
- name: Bundle
run: |
export PATH="$(cat zephyrpath):$PATH"
npm un parcel-plugin-bundle-visualiser
npm run bundle
- name: Prepare for Deployment
uses: JamesIves/[email protected]
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: dist-preview
FOLDER: dist
CLEAN: true
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment