Skip to content

Instantly share code, notes, and snippets.

@sachinsu
Created May 29, 2020 07:04
Show Gist options
  • Save sachinsu/f98fbca1049e15f0360c140610fa4cc4 to your computer and use it in GitHub Desktop.
Save sachinsu/f98fbca1049e15f0360c140610fa4cc4 to your computer and use it in GitHub Desktop.
Github Workflow to build Quasar based Application and deploy to Netlify
on:
push:
branches:
- master
env:
NODE_VERSION: '12.x' # set this to the node version to use
jobs:
build-and-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE_VERSION }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE_VERSION }}
- name: npm install, build
working-directory: ./ui
run: |
# Build and test the project, then
npm install -g @quasar/cli
npm run build --if-present
npm run test --if-present
- name: 'Deploy to netlify'
uses: netlify/actions/cli@master
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.STAGING_NETLIFY_SITE_ID }}
with:
args: deploy --dir=ui/dist/pwa --prod
secrets: '["NETLIFY_AUTH_TOKEN", "NETLIFY_SITE_ID"]'
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment