Skip to content

Hide NS parkings on municipality parkings page #39

Hide NS parkings on municipality parkings page

Hide NS parkings on municipality parkings page #39

name: Build and deploy Veiligstallen app to Azure Web App
on:
push:
branches:
- acceptance
paths-ignore:
- "README.md"
- ".husky"
- ".github/**"
- "**/*.csv"
- .env*
- azure/*
- github/*
- scripts/*
workflow_dispatch:
jobs:
build:
runs-on: ubuntu-latest
environment: acceptance
steps:
- uses: actions/checkout@v2
- name: Set up Node.js version
uses: actions/setup-node@v1
with:
node-version: "18.x"
- name: create env file
env:
NEXT_PUBLIC_API_BASE_URL: ${{ vars.ACC_NEXT_PUBLIC_API_BASE_URL }}
NEXT_PUBLIC_WEB_BASE_URL: ${{ vars.ACC_NEXT_PUBLIC_WEB_BASE_URL }}
DATABASE_URL: ${{vars.ACC_DATABASE_URL}}
NEXTAUTH_SECRET: ${{vars.ACC_NEXTAUTH_SECRET}}
NEXTAUTH_URL: ${{vars.ACC_NEXTAUTH_URL}}
NEXT_PUBLIC_MAPBOX_TOKEN: ${{vars.ACC_NEXT_PUBLIC_MAPBOX_TOKEN}}
run: |
touch .env
echo "NEXT_PUBLIC_API_BASE_URL=$NEXT_PUBLIC_API_BASE_URL" >> .env
echo "NEXT_PUBLIC_WEB_BASE_URL=$NEXT_PUBLIC_WEB_BASE_URL" >> .env
echo "NODE_ENV=production >>" .env
echo "DATABASE_URL=$DATABASE_URL" >> .env
echo "NEXTAUTH_SECRET=$NEXTAUTH_SECRET" >> .env
echo "NEXTAUTH_URL=$NEXTAUTH_URL" >> .env
echo "NEXT_PUBLIC_MAPBOX_TOKEN=$NEXT_PUBLIC_MAPBOX_TOKEN" >> .env
- name: print env file
run: cat .env
- name: npm install, build, and test
env:
NEXT_PUBLIC_API_BASE_URL: ${{ vars.ACC_NEXT_PUBLIC_API_BASE_URL }}
NEXT_PUBLIC_WEB_BASE_URL: ${{ vars.ACC_NEXT_PUBLIC_WEB_BASE_URL }}
DATABASE_URL: ${{vars.ACC_DATABASE_URL}}
NEXTAUTH_SECRET: ${{vars.ACC_NEXTAUTH_SECRET}}
NEXTAUTH_URL: ${{vars.ACC_NEXTAUTH_URL}}
NEXT_PUBLIC_MAPBOX_TOKEN: ${{vars.ACC_NEXT_PUBLIC_MAPBOX_TOKEN}}
run: |
npm install
npm run build
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: ${{ vars.ACC_AZURE_APP_NAME}}
publish-profile: ${{ vars.ACC_AZUREAPPSERVICE_PUBLISHPROFILE_VEILIGSTALLEN }}
package: ./build/standalone