Skip to content

Bump webpack from 5.89.0 to 5.94.0 #119

Bump webpack from 5.89.0 to 5.94.0

Bump webpack from 5.89.0 to 5.94.0 #119

name: Build and deploy to Netlify
on: [push]
env:
ASPNETCORE_ENVIRONMENT: 'Action'
jobs:
deployCommitDraft:
name: Deploy draft to Netlify
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref != 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup npm
uses: actions/setup-node@v2
with:
node-version: 18.18.2
- run: npm ci
- run: npm run prodbuild
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.100'
- name: Add robots.txt disallow
shell: pwsh
run: |
Set-Content "./src/Krompaco.RecordCollector.Web/wwwroot/robots.txt" "User-agent: *`r`nDisallow: /"
- name: Generate static site
run: dotnet test ./src/Krompaco.RecordCollector.Generator/Krompaco.RecordCollector.Generator.csproj --logger "console;verbosity=detailed"
- name: Publish draft to Netlify
uses: nwtgck/[email protected]
with:
publish-dir: './artifacts/static-site'
enable-commit-comment: true
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
publishMasterCommit:
name: Publish to Netlify
runs-on: ubuntu-latest
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
steps:
- name: Checkout repository
uses: actions/checkout@v2
- name: Setup npm
uses: actions/setup-node@v2
with:
node-version: 18.18.2
- run: npm ci
- run: npm run prodbuild
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: '8.0.100'
- name: Add robots.txt disallow
shell: pwsh
run: |
Set-Content "./src/Krompaco.RecordCollector.Web/wwwroot/robots.txt" "User-agent: *`r`nDisallow: /"
- name: Generate static site
run: dotnet test ./src/Krompaco.RecordCollector.Generator/Krompaco.RecordCollector.Generator.csproj --logger "console;verbosity=detailed"
- name: Publish to Netlify production
uses: nwtgck/[email protected]
with:
publish-dir: './artifacts/static-site'
enable-commit-comment: true
production-deploy: true
github-token: ${{ secrets.GITHUB_TOKEN }}
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}