Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add example with Node install #53

Open
bahmutov opened this issue Oct 29, 2020 · 1 comment
Open

Add example with Node install #53

bahmutov opened this issue Oct 29, 2020 · 1 comment

Comments

@bahmutov
Copy link
Owner

bahmutov commented Oct 29, 2020

More complex scenario similar to https://github.com/d3lm/ngx-drag-to-select/blob/master/.github/workflows/main.yml

  • set particular version of Node
  • install dependencies
  • run tests
  • maybe another job to have a matrix of Node versions?
  • maybe build an app and test it in separate jobs?
@YenHub
Copy link
Contributor

YenHub commented Jun 19, 2021

This is my React App boiler plate which includes auto deployment too using Sam Kirkland's FTP Action

on:
  push:
    branches:
      - master
    paths:
      - 'client/**'

name:                       🧪 Auto | Deploy
jobs:
  web-deploy:
    name:                   🎉 Deploy
    runs-on:                ubuntu-latest
    steps:
    - name:                 🚚 Get latest code
      uses:                 actions/[email protected]

    - name:                 🐱‍👤 Use Node.js 14.16.1
      uses:                 actions/setup-node@v2-beta
      with:
        node-version:       '14.16.1'

    - name:                 💥 Install & Cache Deps
      uses:                 bahmutov/[email protected]
      with:
        working-directory:  client

    - name:                 🔨 Build Project
      run:                  INLINE_RUNTIME_CHUNK=false npm run build
      working-directory:    client

    - name:                 🧪 Test Build
      run:                  npm test
      working-directory:    client

    - name:                 🧹 Lint Build
      run:                  npm run lint:ts
      working-directory:    client

    - name:                 📂 Sync files
      uses:                 SamKirkland/[email protected]
      with:
        server:             ${{ secrets.ftpserver }}
        username:           ${{ secrets.ftpuser }}
        password:           ${{ secrets.ftppass }}
        local-dir:          ./client/build/

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants