upgrade to node v20 #53
This file contains hidden or 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
| name: Deploy production from main | |
| on: | |
| push: | |
| branches: [main] | |
| env: | |
| NODE_VERSION: "20.x" | |
| concurrency: production-environment | |
| jobs: | |
| build-and-deploy: | |
| name: Build and deploy | |
| runs-on: ubuntu-latest | |
| environment: production | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ env.NODE_VERSION }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ env.NODE_VERSION }} | |
| cache: 'yarn' | |
| - name: Install dependencies and build | |
| env: | |
| STRAPI_LICENSE: ${{ secrets.STRAPI_LICENSE }} | |
| run: | | |
| yarn install --silent | |
| yarn build | |
| - name: Deploy to Azure Web App (run from zip) | |
| uses: azure/webapps-deploy@v3 | |
| with: | |
| app-name: pof-backend-production | |
| publish-profile: ${{ secrets.AZURE_WEBAPP_PUBLISH_PROFILE }} | |
| clean: true |