Skip to content

List dist

List dist #165

name: Deploy Staging - Surge.sh
on:
push:
branches:
- 'develop'
env:
NODE: 14
SURGE_STAGING_DOMAIN: https://nasa-apt.surge.sh
jobs:
build:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.8.0
with:
access_token: ${{ github.token }}
- name: Checkout
uses: actions/checkout@v2
- name: Use Node.js ${{ env.NODE }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE }}
- 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: Install
run: yarn install
- name: list dist, if exists
run: ls -la dist
- name: Build staging
run: yarn stage
- name: Deploy Staging to Surge
run: |
cp ./dist/index.html ./dist/200.html
yarn run surge ./dist ${{ env.SURGE_STAGING_DOMAIN }} --token ${{ secrets.SURGE_TOKEN }}
- name: list dist
run: ls -la dist