-
-
Notifications
You must be signed in to change notification settings - Fork 6.4k
add open-next deployment github workflow #8211
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change | ||||
---|---|---|---|---|---|---|
@@ -0,0 +1,64 @@ | ||||||
# Security Notes | ||||||
# Only selected Actions are allowed within this repository. Please refer to (https://github.com/nodejs/nodejs.org/settings/actions) | ||||||
# for the full list of available actions. If you want to add a new one, please reach out a maintainer with Admin permissions. | ||||||
# REVIEWERS, please always double-check security practices before merging a PR that contains Workflow changes!! | ||||||
# AUTHORS, please only use actions with explicit SHA references, and avoid using `@master` or `@main` references or `@version` tags. | ||||||
|
||||||
# Note: this is a temporary workflow for deploying the OpenNext version of the site (hosted on https://node-test.org) | ||||||
# this version of the site is just used for testing purposes and ideally we want to keep it in sync with the | ||||||
# official website | ||||||
|
||||||
name: Deploy the Cloudflare OpenNext test version of the site (https://node-test.org) | ||||||
|
||||||
on: | ||||||
workflow_dispatch: | ||||||
push: | ||||||
dario-piotrowicz marked this conversation as resolved.
Show resolved
Hide resolved
|
||||||
branches: | ||||||
- main | ||||||
|
||||||
concurrency: | ||||||
group: ${{ github.workflow }}-${{ github.ref }} | ||||||
cancel-in-progress: true | ||||||
|
||||||
permissions: | ||||||
contents: read | ||||||
|
||||||
jobs: | ||||||
playwright: | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more.
Suggested change
|
||||||
name: Deploy Open-Next site | ||||||
runs-on: ubuntu-latest | ||||||
|
||||||
steps: | ||||||
- name: Harden Runner | ||||||
uses: step-security/harden-runner@f4a75cfd619ee5ce8d5b864b0d183aff3c69b55a # v2.13.1 | ||||||
with: | ||||||
egress-policy: audit | ||||||
|
||||||
- name: Git Checkout | ||||||
uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | ||||||
with: | ||||||
fetch-depth: 2 | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Why does this need a depth of 2? 🤔 |
||||||
|
||||||
- name: Set up pnpm | ||||||
uses: pnpm/action-setup@a7487c7e89a18df4991f7f222e4898a00d66ddda # v4.1.0 | ||||||
|
||||||
- name: Set up Node.js | ||||||
uses: actions/setup-node@a0853c24544627f65ddf259abe73b1d18a591444 # v5.0.0 | ||||||
with: | ||||||
# We want to ensure that the Node.js version running here respects our supported versions | ||||||
node-version-file: '.nvmrc' | ||||||
cache: 'pnpm' | ||||||
|
||||||
- name: Install packages | ||||||
run: pnpm install --frozen-lockfile | ||||||
|
||||||
- name: Build open-next site | ||||||
working-directory: apps/site | ||||||
run: node --run cloudflare:build:worker | ||||||
|
||||||
- name: Deploy open-next site | ||||||
working-directory: apps/site | ||||||
run: node --run cloudflare:deploy | ||||||
env: | ||||||
CF_WORKERS_SCRIPTS_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} | ||||||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we need this additional env var? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. +1 |
||||||
CLOUDFLARE_API_TOKEN: ${{ secrets.CLOUDFLARE_API_TOKEN }} |
Uh oh!
There was an error while loading. Please reload this page.