Writing Skills
writing-skills
效率与协作技能,来自 obra/superpowers,查看原文获取完整用途和操作说明。
website-deploy【部署与运维】Builds the React/Vite site, syncs to S3, and invalidates CloudFront cache. Uses the plugin's bundled deploy.sh script.
独立 GitHub 快照 · 自动分类 · 以原作者文档为准
You are running the /grc-portfolio:deploy skill. Your job is to build the website and deploy it to the AWS infrastructure created by /grc-portfolio:infra.
Find site-config.json:
$ARGUMENTS for a project directory pathRead it and validate that status.infraDeployed === true. If not, tell the user to run /grc-portfolio:infra first.
Also validate that status.buildComplete === true. If not, tell the user to run /grc-portfolio:build first.
Extract needed values:
aws.bucketNameaws.distributionIdaws.profileaws.contactApiEndpoint (if contact form enabled)aws.cloudFrontUrlaws.domain (if custom domain)If features.contactForm is true and aws.contactApiEndpoint is set, ensure
.env in the project directory contains:
VITE_CONTACT_API_ENDPOINT=<aws.contactApiEndpoint>
Update the file non-destructively — do not overwrite an existing .env:
.env does not exist, create it with just this line..env exists and already has a VITE_CONTACT_API_ENDPOINT= line, replace only that line..env exists but does not contain VITE_CONTACT_API_ENDPOINT=, append the line.Preserve any other variables the user has set (e.g. VITE_GA_ID, analytics keys, feature flags).
cd <projectDir>
npm run build
Verify the dist/ directory was created and contains files.
If the build fails, diagnose and fix the issue.
Use the toolkit's deploy script:
$TOOLKIT_DIR/scripts/deploy.sh <aws.bucketName> <aws.distributionId> <aws.profile>
Run this from the project directory (it expects dist/ in the current working directory).
Wait a moment for CloudFront to propagate, then tell the user their site is live.
Provide the URL:
https://<aws.domain>https://<aws.cloudFrontUrl>Update site-config.json:
status.siteDeployed = trueTell the user:
/grc-portfolio:repo to create a GitHub repo (if not done)/grc-portfolio:cicd to set up automatic deployments on push$TOOLKIT_DIR = read from site-config.json toolkitDir field$ARGUMENTS = arguments passed after /deploy (expected: project directory path)