Skip to content

Update description.mdx #18

Update description.mdx

Update description.mdx #18

Workflow file for this run

name: Build
on:
push:
pull_request:
jobs:
build:
name: Test Build
runs-on: ubuntu-latest
permissions:
checks: write
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
- name: Install dependencies
run: npm ci --no-scripts
- name: Build site
run: npm run build
- name: Send bundle stats to RelativeCI
uses: relative-ci/agent-action@v2
with:
webpackStatsFile: ./webpack-stats.json
key: ${{ secrets.RELATIVE_CI_KEY }}
token: ${{ secrets.GITHUB_TOKEN }}
- name: Zip up the public directory
run: cd public && zip -r ../site.zip ./
- name: Upload zipped site as an artifact
uses: actions/upload-artifact@v3
with:
name: site
path: site.zip
- name: Determine the size of the zip file
id: determineSize
# Save to GITHUB_OUTPUT
run: echo "SIZE=$(du -sh site.zip | cut -f1)" >> $GITHUB_OUTPUT
- name: Create a neutral check with the zipped size
uses: LouisBrunner/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
name: "Build Size"
conclusion: neutral
output: |
{"title":"${{ steps.determineSize.outputs.SIZE }} (of 5M)","summary":"${{ steps.determineSize.outputs.SIZE }} (of 5M)"}
- name: Upload to netlify (if a PR build)
if: github.event_name == 'pull_request'
uses: nwtgck/[email protected]
with:
publish-dir: ./public
production-deploy: false
github-token: ${{ secrets.GITHUB_TOKEN }}
deploy-message: ${{ github.event.pull_request.title }})
enable-pull-request-comment: true
enable-commit-comment: false
enable-commit-status: true
overwrites-pull-request-comment: true
# replicate deploy preview prefix (ish)
alias: deploy-preview-pr-${{ github.event.pull_request.number }}
enable-github-deployment: false # seems to not be a valid option? (not in schema?)
env:
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }}
timeout-minutes: 1