Skip to content

Commit

Permalink
adding .next to gitignore. updating zipper system to unzip files befo…
Browse files Browse the repository at this point in the history
…re deploying
  • Loading branch information
siddheshraze committed Feb 23, 2024
1 parent 4303ce2 commit 7670c8b
Show file tree
Hide file tree
Showing 2 changed files with 26 additions and 18 deletions.
43 changes: 25 additions & 18 deletions .github/workflows/new-file-upload-system_forestgeo-livesite.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,18 @@ on:
jobs:
build:
runs-on: ubuntu-latest
environment: development
environment:
name: 'development'
env:
AZURE_AD_CLIENT_SECRET: ${{ secrets.AZURE_AD_CLIENT_SECRET }}
AZURE_AD_CLIENT_ID: ${{ secrets.AZURE_AD_CLIENT_ID }}
AZURE_AD_TENANT_ID: ${{ secrets.AZURE_AD_TENANT_ID }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
AZURE_SQL_USER: ${{ secrets.AZURE_SQL_USER }}
AZURE_SQL_PASSWORD: ${{ secrets.AZURE_SQL_PASSWORD }}
AZURE_SQL_SERVER: ${{ secrets.AZURE_SQL_SERVER }}
AZURE_SQL_DATABASE: ${{ secrets.AZURE_SQL_DATABASE }}

steps:
- uses: actions/checkout@v4

Expand All @@ -21,22 +32,6 @@ jobs:
with:
node-version: '18.x'

- name: create frontend env file
run: |
touch frontend/.env
echo AZURE_AD_CLIENT_SECRET=${{ secrets.AZURE_AD_CLIENT_SECRET }} >> frontend/.env
echo AZURE_AD_CLIENT_ID=${{ secrets.AZURE_AD_CLIENT_ID }} >> frontend/.env
echo AZURE_AD_TENANT_ID=${{ secrets.AZURE_AD_TENANT_ID }} >> frontend/.env
echo NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }} >> frontend/.env
echo AZURE_SQL_USER=${{ secrets.AZURE_SQL_USER }} >> frontend/.env
echo AZURE_SQL_PASSWORD=${{ secrets.AZURE_SQL_PASSWORD }} >> frontend/.env
echo AZURE_SQL_SERVER=${{ secrets.AZURE_SQL_SERVER }} >> frontend/.env
echo AZURE_SQL_DATABASE=${{ secrets.AZURE_SQL_DATABASE }} >> frontend/.env
echo AZURE_SQL_PORT=${{ secrets.AZURE_SQL_PORT }} >> frontend/.env
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
# - name: Cache node modules
# uses: actions/cache@v2
# with:
Expand Down Expand Up @@ -67,18 +62,30 @@ jobs:
environment:
name: 'development'
url: ${{ steps.deploy-to-webapp.outputs.webapp-url }}
env:
AZURE_AD_CLIENT_SECRET: ${{ secrets.AZURE_AD_CLIENT_SECRET }}
AZURE_AD_CLIENT_ID: ${{ secrets.AZURE_AD_CLIENT_ID }}
AZURE_AD_TENANT_ID: ${{ secrets.AZURE_AD_TENANT_ID }}
NEXTAUTH_SECRET: ${{ secrets.NEXTAUTH_SECRET }}
AZURE_SQL_USER: ${{ secrets.AZURE_SQL_USER }}
AZURE_SQL_PASSWORD: ${{ secrets.AZURE_SQL_PASSWORD }}
AZURE_SQL_SERVER: ${{ secrets.AZURE_SQL_SERVER }}
AZURE_SQL_DATABASE: ${{ secrets.AZURE_SQL_DATABASE }}

steps:
- name: Download artifact from build job
uses: actions/download-artifact@v3
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: 'development'
publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }}
package: ./release.zip
package: .
1 change: 1 addition & 0 deletions frontend/.gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@
/coverage

# next.js
/.next/
/out/

# production
Expand Down

0 comments on commit 7670c8b

Please sign in to comment.