github workflow file ubuntu version change #121
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests & deploy dev | |
on: | |
push: | |
branches-ignore: | |
- "master" | |
paths-ignore: | |
- "db/**" | |
- "**.md" | |
workflow_dispatch: | |
jobs: | |
cypress-tests: | |
name: Install & run Cypress tests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v1 | |
- name: Cypress run | |
uses: cypress-io/github-action@v2 | |
with: | |
browser: chrome | |
spec: cypress/integration/tests.spec.js | |
start: npm run serve-prod | |
# quote the url to be safe against YML parsing surprises | |
wait-on: "http://localhost:8080" | |
build-deploy-dev: | |
name: Build & deploy dev | |
if: github.ref == 'refs/heads/develop' | |
needs: [cypress-tests] | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "12.x" | |
- name: Cache node modules | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install Dependencies | |
run: npm install | |
- name: Build | |
run: npm run build-prod | |
- name: Deploy dev | |
uses: w9jds/firebase-action@master | |
with: | |
args: deploy --only hosting | |
env: | |
FIREBASE_TOKEN: ${{ secrets.FIREBASE_TOKEN }} |