-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
65fd181
commit 7bf0a72
Showing
4 changed files
with
91 additions
and
4 deletions.
There are no files selected for viewing
77 changes: 77 additions & 0 deletions
77
.github/workflows/new-file-upload-system-alternate-forestgeo-livesite.yml
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
# Docs for the Azure Web Apps Deploy action: https://github.com/Azure/webapps-deploy | ||
# More GitHub Actions for Azure: https://github.com/Azure/actions | ||
|
||
name: Alternate Testing Workflow | ||
|
||
on: | ||
push: | ||
branches: | ||
- new-file-upload-system | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build-and-deploy: | ||
runs-on: ubuntu-latest | ||
environment: development | ||
|
||
steps: | ||
- uses: actions/checkout@v4 | ||
|
||
- name: Set up Node.js version | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
|
||
- name: create env file (now moved to base directory) | ||
run: | | ||
touch .env | ||
echo AZURE_AD_CLIENT_SECRET=${{ secrets.AZURE_AD_CLIENT_SECRET }} >> .env | ||
echo AZURE_AD_CLIENT_ID=${{ secrets.AZURE_AD_CLIENT_ID }} >> .env | ||
echo AZURE_AD_TENANT_ID=${{ secrets.AZURE_AD_TENANT_ID }} >> .env | ||
echo NEXTAUTH_SECRET=${{ secrets.NEXTAUTH_SECRET }} >> .env | ||
echo AZURE_SQL_USER=${{ secrets.AZURE_SQL_USER }} >> .env | ||
echo AZURE_SQL_PASSWORD=${{ secrets.AZURE_SQL_PASSWORD }} >> .env | ||
echo AZURE_SQL_SERVER=${{ secrets.AZURE_SQL_SERVER }} >> .env | ||
echo AZURE_SQL_DATABASE=${{ secrets.AZURE_SQL_DATABASE }} >> .env | ||
echo AZURE_SQL_PORT=${{ secrets.AZURE_SQL_PORT }} >> .env | ||
echo AZURE_STORAGE_SAS_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_SAS_CONNECTION_STRING }} >> .env | ||
echo AZURE_SQL_SCHEMA=${{ secrets.AZURE_SQL_SCHEMA }} >> .env | ||
echo AZURE_STORAGE_CONNECTION_STRING=${{ secrets.AZURE_STORAGE_CONNECTION_STRING }} >> .env | ||
echo NODE_ENV=development >> .env | ||
echo PORT=3000 >> .env | ||
- name: Cache node modules | ||
uses: actions/cache@v2 | ||
with: | ||
path: frontend/node_modules | ||
key: ${{ runner.os }}-node-${{ hashFiles('**/package-lock.json') }} | ||
restore-keys: | | ||
${{ runner.os }}-node- | ||
- name: remove backend and legacy dirs --> not needed for app execution | ||
run: | | ||
rm -rf backend/ | ||
rm -rf frontend/ | ||
- name: move all files from frontend/ into base directory | ||
run: | | ||
mv frontend/* . | ||
rm -rf frontend/ | ||
ls -altr | ||
- name: npm install, build, and test | ||
run: | | ||
npm install | ||
npm run build --if-present | ||
npm run test --if-present | ||
mv ./build/static ./build/standalone/build | ||
mv ./public ./build/standalone | ||
- 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.AZUREAPPSERVICE_PUBLISHPROFILE_852346BD764D45D08854E6679137F844 }} | ||
package: ./build/standalone |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -39,3 +39,4 @@ next-env.d.ts | |
.idea/* | ||
.vscode/* | ||
/*.zip | ||
.github/workflows/new-file-upload-system_forestgeo-livesite.yml |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters