Skip to content

Commit

Permalink
found tutorial online. applying changes noted there
Browse files Browse the repository at this point in the history
  • Loading branch information
siddheshraze committed Feb 26, 2024
1 parent 4596546 commit e2fed9a
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 18 deletions.
27 changes: 9 additions & 18 deletions .github/workflows/new-file-upload-system_forestgeo-livesite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,12 @@ on:
push:
branches:
- new-file-upload-system
paths-ignore:
- "README.md"
- ".husky"
- ".github/**"
- "**/*.csv"
- .env*
workflow_dispatch:

jobs:
Expand Down Expand Up @@ -36,6 +42,7 @@ jobs:
echo AZURE_STORAGE_SAS_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_SAS_CONNECTION_STRING }} >> frontend/.env
echo AZURE_SQL_SCHEMA=${{ secrets.AZURE_SQL_SCHEMA }} >> frontend/.env
echo AZURE_STORAGE_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} >> frontend/.env
echo NODE_ENV=development >> frontend/.env
# - name: Cache node modules
# uses: actions/cache@v2
Expand All @@ -53,35 +60,19 @@ jobs:
npm run test --if-present
- name: Zip artifact for deployment
run: zip -r release.zip ./frontend/*
run: zip next.zip ./* .next .env -qr

- name: Upload artifact for deployment job
uses: actions/upload-artifact@v4
with:
name: node-app
path: release.zip

deploy:
runs-on: ubuntu-latest
needs: build
environment:
name: 'development'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v4
with:
name: node-app

- name: Unzip artifact for deployment
run: unzip release.zip

- name: 'Deploy to Azure Web App'
id: deploy-to-webapp
uses: azure/webapps-deploy@v2
with:
app-name: 'forestgeo-livesite'
slot-name: 'production'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: .
package: .
11 changes: 11 additions & 0 deletions frontend/ecosystem.config.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
module.exports = {
apps: [
{
name: "forestgeo-livesite",
script: "./node_modules/next/dist/bin/next",
args: "start -p " + (process.env.PORT || 3000),
watch: false,
autorestart: true,
},
],
};

0 comments on commit e2fed9a

Please sign in to comment.