Skip to content

Commit

Permalink
Simplify staging deploy workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
vgeorge committed Jun 25, 2024
1 parent 7ab2099 commit 1c09e6b
Showing 1 changed file with 1 addition and 35 deletions.
36 changes: 1 addition & 35 deletions .github/workflows/deploy-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: Deploy Staging - Surge.sh
on:
push:
branches:
- 'develop'
- 'develop'

env:
NODE: 14
Expand Down Expand Up @@ -34,46 +34,12 @@ jobs:
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: yarn install

- name: Build staging
run: yarn stage

deploy:
runs-on: ubuntu-latest
needs: build

steps:
- name: Checkout
uses: actions/checkout@v2

- name: Restore 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: Restore dist cache
uses: actions/cache@v2
id: cache-dist
with:
path: dist
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ github.workflow }}-${{ github.sha }}

- name: Use Node.js ${{ env.NODE }}
uses: actions/setup-node@v1
with:
node-version: ${{ env.NODE }}

- name: Deploy Staging to Surge
run: |
cp ./dist/index.html ./dist/200.html
Expand Down

0 comments on commit 1c09e6b

Please sign in to comment.