Skip to content

Update dependencies #32

Update dependencies

Update dependencies #32

Workflow file for this run

name: Landscape
on:
push:
branches:
- 'master'
- 'develop'
env:
NODE: 14
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/[email protected]
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v3
- name: Use Node.js ${{ env.NODE }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE }}
- name: Use Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '2.3'
- name: Cache node_modules
uses: actions/cache@v2
id: cache-node-modules
with:
path: node_modules
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package.json') }}
- name: Cache dist
uses: actions/cache@v2
id: cache-dist
with:
path: dist
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.workflow }}-${{ github.sha }}
- name: Install
run: npm install
- name: Cache _site
uses: actions/cache@v2
id: cache-_site
with:
path: _site
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Build production
run: npm run build
deploy:
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Restore _site cache
uses: actions/cache@v2
id: cache-_site
with:
path: _site
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.sha }}
- name: Deploy to surge 🚀
if: github.ref == 'refs/heads/develop'
uses: dswistowski/surge-sh-action@v1
with:
domain: 'landscape2022.surge.sh'
project: '_site'
login: ${{ secrets.SURGE_LOGIN }}
token: ${{ secrets.SURGE_TOKEN }}
- name: Deploy to GH Pages 🚀
if: github.ref == 'refs/heads/master'
uses: JamesIves/[email protected]
with:
branch: gh-pages
clean: true
single-commit: true
folder: _site