Skip to content

# Flow diagram for the Next.js GitHub Actions deployment workflow #561

@Dargon789

Description

@Dargon789

Reviewer's Guide

Adds initial project infrastructure for automation and metadata, including a GitHub Actions workflow to build and deploy a Next.js site to GitHub Pages, a sample CircleCI config, a basic security policy document, and a changeset entry for the dashboard package.

Flow diagram for the Next.js GitHub Actions deployment workflow

flowchart TD
  trigger_push["Push_to_main_or_workflow_dispatch"]

  subgraph Build_job
    checkout["Checkout_repository"]
    detect_pm["Detect_package_manager"]
    setup_node["Setup_Node_20_with_cache"]
    setup_pages["Configure_Pages_static_site_generator_next"]
    restore_cache["Restore_Next_cache"]
    install_deps["Install_dependencies_(npm_or_yarn)"]
    next_build["Build_with_next_build"]
    upload_artifact["Upload_Pages_artifact_from_out"]
  end

  subgraph Deploy_job
    deploy_pages["Deploy_to_GitHub_Pages"]
  end

  trigger_push --> checkout
  checkout --> detect_pm
  detect_pm --> setup_node
  setup_node --> setup_pages
  setup_pages --> restore_cache
  restore_cache --> install_deps
  install_deps --> next_build
  next_build --> upload_artifact
  upload_artifact --> deploy_pages
Loading

File-Level Changes

Change Details Files
Introduce GitHub Actions workflow to build and deploy the Next.js app to GitHub Pages on pushes to main and manual dispatch.
  • Configure workflow triggers for pushes to main and manual workflow dispatch
  • Set appropriate GitHub Pages permissions and deployment concurrency settings
  • Detect package manager (yarn vs npm) and configure Node.js and caching accordingly
  • Build the Next.js app and upload the static output as a GitHub Pages artifact
  • Add a separate deploy job that publishes the uploaded artifact to GitHub Pages
.github/workflows/nextjs.yml
Add a basic CircleCI configuration with a sample job and workflow.
  • Define a simple docker-based job that checks out the repo and runs a greeting command
  • Configure a minimal workflow that runs the sample job
.circleci/config.yml
Document security policy scaffolding for supported versions and vulnerability reporting.
  • Add a SECURITY.md with a placeholder supported-versions table
  • Add guidance sections for reporting vulnerabilities with placeholder text
SECURITY.md
Register a patch-level changeset for the dashboard package describing this change.
  • Create a changeset file marking a patch bump for the thirdweb-dashboard package
  • Add a brief description label for the patch
.changeset/tender-tigers-smash.md

Tips and commands

Interacting with Sourcery

  • Trigger a new review: Comment @sourcery-ai review on the pull request.
  • Continue discussions: Reply directly to Sourcery's review comments.
  • Generate a GitHub issue from a review comment: Ask Sourcery to create an
    issue from a review comment by replying to it. You can also reply to a
    review comment with @sourcery-ai issue to create an issue from it.
  • Generate a pull request title: Write @sourcery-ai anywhere in the pull
    request title to generate a title at any time. You can also comment
    @sourcery-ai title on the pull request to (re-)generate the title at any time.
  • Generate a pull request summary: Write @sourcery-ai summary anywhere in
    the pull request body to generate a PR summary at any time exactly where you
    want it. You can also comment @sourcery-ai summary on the pull request to
    (re-)generate the summary at any time.
  • Generate reviewer's guide: Comment @sourcery-ai guide on the pull
    request to (re-)generate the reviewer's guide at any time.
  • Resolve all Sourcery comments: Comment @sourcery-ai resolve on the
    pull request to resolve all Sourcery comments. Useful if you've already
    addressed all the comments and don't want to see them anymore.
  • Dismiss all Sourcery reviews: Comment @sourcery-ai dismiss on the pull
    request to dismiss all existing Sourcery reviews. Especially useful if you
    want to start fresh with a new review - don't forget to comment
    @sourcery-ai review to trigger a new review!

Customizing Your Experience

Access your dashboard to:

  • Enable or disable review features such as the Sourcery-generated pull request
    summary, the reviewer's guide, and others.
  • Change the review language.
  • Add, remove or edit custom review instructions.
  • Adjust other review settings.

Getting Help

Originally posted by @sourcery-ai[bot] in #477 (comment)

Metadata

Metadata

Assignees

Labels

Ecosystem PortalStalebugSomething isn't workingdashboarddependenciesPull requests that update a dependency filedocumentationImprovements or additions to documentationduplicateThis issue or pull request already existsenhancementNew feature or requestgithub_actionsPull requests that update GitHub Actions codegood first issueGood for newcomershelp wantedExtra attention is neededinvalidThis doesn't seem rightjavascriptPull requests that update Javascript codepackagesplaygroundportalquestionFurther information is requestedsdk

Projects

Status

Done

Status

Done

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions