* Do not use `build.status` of 'pending' as a looping condition for Heroku deployment
* Don't wait for `appSetup.status` either
* Fix incorrect Octokit method usage in local deploy script
* Bump the number of allowable errors from 5 to 10
* More logging!
* Add an environment variable for easily increasing the number of allowed Heroku failures per phase of polling
* Move concurrency control to top-level in prod deploy workflow
* Add 503 to the list of temporarily acceptable Heroku failure codes
* Add HEROKU_PRODUCTION_APP_NAME back into the prod deploy workflow
* run prettier
* removing files from test/integration
* update cron job to not start on the hour
* add github/github comment
* update comment
* updating to search by indices in the content rather than by line
* small updates and updating character max
* update name of script run
* updating to use api search code and get contents
* using api search code and get contents
* adding token check and .js
* remove blank line for title
* update issue body content
* update comment
* add support for GitHub.developer_help_url links
* Update the production deployment workflow to target the main Heroku app
Without exposing our internal Heroku app name!
* Refactor the staging deployment script a bit to match more closely
* Use the HEROKU_PRODUCTION_APP_NAME Secret in the workflow
* Add a note about the newly required environment variable for production deployment into the local deploy script
* Add critical errors if the HEROKU_PRODUCTION_APP_NAME is missing
* Extract HEROKU_PRODUCTION_APP_NAME from process.env
* Revert the critical parts of PR #21807 to no longer deploy to prod via Actions
* Don't require HEROKU_PRODUCITON_APP_NAME
* Update the production deployment workflow to target the main Heroku app
Without exposing our internal Heroku app name!
* Refactor the staging deployment script a bit to match more closely
* Use the HEROKU_PRODUCTION_APP_NAME Secret in the workflow
* Add a note about the newly required environment variable for production deployment into the local deploy script
* Add critical errors if the HEROKU_PRODUCTION_APP_NAME is missing
* Extract HEROKU_PRODUCTION_APP_NAME from process.env
* Use the 'script/deployment/create-staging-app-name' module when creating the content changes table comments
* Remove the shebang from the non-runnable script helper module
* Create a logic branch to deploy to production via a local script
* Ignore forceRebuild default value for production
* Add soft warnings for missing-but-not-critical env vars
* Only include the Preboot delay if the Fastly env vars are present
* Add some warning emojis ⚠️
* More emojis!
* Make FASTLY_* checks all independent
* Add more comments about additional env vars recommended for a local prod deployment
* add production deployment
* updating existing build
* remove state
* remove PR_URL and switch to main branch
* break out into build, prepare, and deploy
* update to download-artifact
* update staging to prod
* Actions production deployment redux (#21238)
* Simplify production deployment into a single Actions job
* Force esm to install
* Switch flag ordering to match staging deploy
* Use 'npm install' for the second installation to avoid deleting the prodDeps
* Apply Heroku upload fixes
* Include `.npmrc` file in builds to omit `optionalDeps`
* Remove download-artifact action
Co-authored-by: Grace Park <gracepark@github.com>
* Script updates to prod deployment (#21247)
* updating script to use latest sha
* changing back workflowRunLog
* remove line
* update error wording
* remove comment - using commit sha
* need release.id
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* remove hydro
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update .github/workflows/prod-build-deploy-pr.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update script/deployment/deploy-to-production.js
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* updating spacing
* add 404/429 responses while polling Heroku API for prod
* removing nested ifs
* adding SOURCE_BLOB_URL
* update for early access
* add install dotenv
* need to add persist-credentials
* Testing GET request
* update request
* Rename workflow file to remove '-pr'
We are now triggering on pushes to 'main' rather than PR merges
* Remove the unnecessary workflow step to create a failure Status
Because the production deploy is done via a single workflow rather than a 2-part workflow chain, this is thankfully unnecessary
* Install all of the npm dependencies
We'll need them!
* Add the '-z' flag to 'tar' to gzip the tarball
* Pass the Heroku upload URL via env vars for security
Prevents potential injection attacks
* Log the deployment ID and log URL as deploy step outputs
* Take notice of Heroku polling resulting in failure statuses
* Add a note to consider waiting for Heroku Preboot
* Add a script and workflow step to purge Fastly
* update response to get sha
* Switch to Octokit functions instead of 'request' method
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Explicitly ensure the early access parent directories are created when cloning
* Use explicit --file flag with tar
* Remove security hole for Staging deployment by concatenating archives
* Fail the staging builds if *.js, .npmrc, or Procfile is changed in the open source repo
* docker build: extract user-code in separate directory
* Checkout PR base branch and install dependencies
* Remove one-off package installs
* Remove selective file checkout
* Don't persist git cloning credentials
It usually makes the clone of early access content fail in the later steps
* Update .github/workflows/staging-deploy-pr-docker.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Update .github/workflows/staging-deploy-pr-docker.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Remove debugging step
* Best practice: Use environment variables to avoid potential injection attacks if the data was user-controlled
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: Robert Sese <sese@github.com>
Co-authored-by: Robert Sese <robert.sese@gmail.com>
* Add a script to remove stale staging deployment environments from GitHub
* Add second job to cleanup GitHub deployment environments
* Specify GITHUB_TOKEN permissions matrix
* Stop marking staging deployments as transient
* Update staging undeployment mechanism to clean-up deployment environments on PR merge
* Define a stale PR as one that was merged or has been closed for more than 2 hours
* Rename workflow file
* Update Staging deployment workflow to create Status updates
* Update local Staging deployment script to create Status updates
Co-authored-by: Rachael Sewell <rachmari@github.com>
* Start parallel Docker image deploy workflows
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>
* Add early access content build stage
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
* Create Heroku App script and workflow steps
* Tag the image for Heroku
* Push the image and grab the image ID
* Set app name and image id outputs
* Add parallel deploy script for Docker
* Scope workflow run to 'docker-' and release image to Heroku
* Update .github/workflows/staging-build-pr-docker.yml
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* Exclude Docker workflow
* Cleanup Docker deploys
* Use action sha
Co-authored-by: Mike Surowiec <mikesurowiec@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@users.noreply.github.com>
Co-authored-by: James M. Greene <JamesMGreene@github.com>
* update article content to markdown ui component
* decouple lunr indexing from class name
* remove summary outline none rule, apply utility class instead
* improve typing
* scope more styles down to markdown-body/extended-markdown
* move all markdown-body style overrides to MarkdownContent component
* fix class targeting within css module
* clean up MarkdownContent header style
* rename data-lunr to data-search
* fix: inline code color issue
* fix: update article markdown to work with MarkdownContent
* Add a Staging build workflow
* Remove all commented out code from build workflow
It will be handled in https://github.com/github/docs-engineering/issues/726
* Use pinned version of upload-artifact action
* Tweaks to build
* Minor deployment script refactoring
* Update the Staging deployment workflow
* Missed refactoring tweak
* Add relevant comments
* Update Heroku app naming convention for Actions deploy to include 'gha-' prefix
* Update Heroku app ConfigVars and SourceBlob for optional prebuilt app
* Remove obsolete 'dist/' dir from PR build artifact
See https://github.com/github/docs-internal/pull/20405
* Ensure a new enough version of npm is used
* Switch to creating a tarball for upload
* Remove obsolete 'layouts' dir from file list
* Ditch the verbosity for 'tar'... too many files
* Add tarball support to deploy
* Add esm workaround to deploy script
See https://github.com/actions/github-script/issues/168
* Temporarily ignore staging deploy workflow from workflow linter
* Update deployment to use a Heroku Build Source instead of a GitHub Actions Artifact
* Update undeploy workflow to use ESM workaround
See https://github.com/actions/github-script/issues/168
* Add 'esm' package to optionalDependencies to better support workaround
See https://github.com/actions/github-script/issues/168
* Add Slack notifications for workflow failures
* Wrap AppSetup polling in try-catch
* Improve dyno monitoring
* Rename 'script/deploy' to have a .js extension #esm
* Update script references to include the extension
* Use non-deprecated Sources API for Heroku
* Use normal quotes
* Stub in a step to mark deployment inactive after timing out
* Apply suggestions from code review
Co-authored-by: Rachael Sewell <rachmari@github.com>
Co-authored-by: Rachael Sewell <rachmari@github.com>