Skip to content

Commit

Permalink
adding surge action
Browse files Browse the repository at this point in the history
  • Loading branch information
dlopezalvas committed Oct 24, 2023
1 parent ec888bf commit f5a9975
Show file tree
Hide file tree
Showing 2 changed files with 31 additions and 0 deletions.
30 changes: 30 additions & 0 deletions .github/workflows/surge.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: publish-surge

on:
push:
branches:
- surge-prueba

jobs:
publish-surge:
runs-on: ubuntu-latest
env:
REACT_APP_API_URL: ${{ secrets.API_URL }}
REACT_APP_GOOGLE_ANALYTICS_KEY: ${{ secrets.GOOGLE_ANALYTICS_KEY }}
REACT_APP_VERSION: ${{github.ref_name}}
if: startsWith(github.ref, 'refs/tags')
needs: test
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version-file: ".nvmrc"
- run: npm install
- run: npm run build:surge
- name: Deploy to pbdevelop.surge.sh
uses: dswistowski/surge-sh-action@v1
with:
domain: 'pbdevelop.surge.sh'
project: 'build/'
login: ${{ secrets.SURGE_LOGIN }}
token: ${{ secrets.SURGE_TOKEN }}
1 change: 1 addition & 0 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
"start:emberDev": "sh ./scripts/localEmber.sh",
"prebuild": "node scripts/setEmberRoot.js public/emberPB emberPB/",
"build": "react-scripts build",
"build:surge": "react-scripts build",
"test": "react-scripts test",
"eject": "react-scripts eject",
"electron-start": "electron ./build",
Expand Down

0 comments on commit f5a9975

Please sign in to comment.