You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
if [ "$org" == "$GITHUB_REPOSITORY_OWNER" ]; then org_found=1; fi
208
+
done
209
+
for event in $ALLOWED_EVENTS; do
210
+
if [ "$event" == "$GITHUB_EVENT_NAME" ]; then event_found=1; fi
211
+
done
212
+
for ref in $ALLOWED_REFS; do
213
+
if [ "$DEPLOYMENT_ENV" = "prod" ]; then
214
+
if [ "$ref" == "$GITHUB_REF" ]; then ref_found=1; fi
215
+
else
216
+
ref_found=1
217
+
fi
218
+
done
219
+
for user in $USER_LIST; do
220
+
if [ "$DEPLOYMENT_ENV" = "prod" ]; then
221
+
if [ "$user" == "$GITHUB_ACTOR" ]; then user_found=1; fi
222
+
else
223
+
user_found=1
224
+
fi
225
+
done
226
+
if [ $org_found$event_found$ref_found$user_found -ne 1111 ]; then
227
+
echo "Repository owner, event, ref or actor are not explicitely allowed to use this workflow: $GITHUB_REPOSITORY_OWNER, $GITHUB_EVENT_NAME, $GITHUB_REF, $GITHUB_ACTOR"
228
+
exit 1
229
+
fi
230
+
exit 0
231
+
232
+
- name: Configure AWS credentials via OIDC (assume role)
@@ -194,4 +195,90 @@ A reusable composite action written by s.breen that logs into Azure, retrieves s
194
195
Each matched secret is exported as an environment variable named after the secret (e.g. `MySecret1`). Multiline secret values are handled using the heredoc syntax supported by `$GITHUB_ENV`.
A reusable (`workflow_call`) workflow that builds the nginx.org website using `make` and deploys it to AWS S3. It supports two separate jobs controlled by the `deployment_env` input:
203
+
204
+
- **`build-staging`** — Builds the site from source and syncs the output to a versioned staging path in S3 (`staging/<sha>/`). Also uploads a `.deployed.txt` marker file used by the production job.
205
+
- **`build-prod`** — Waits for the staging marker to be present for the current commit SHA, then promotes the staged build to the production S3 path (`prod/`).
206
+
207
+
Both jobs use the [az-sync](#az-sync-action) action to retrieve AWS credentials from Azure Key Vault before assuming an AWS IAM role via OIDC.
208
+
209
+
## How-to
210
+
These instructions apply only to NGINX GitHub doc repositories.
211
+
1. Navigate to the actions section
212
+
1. On the left side of the page, select Deploy nginx.org
213
+
1. Click a "Run workflow" button.
214
+
1. Select select propper "Deployment environment" and press "Run workflow"
215
+
The non-prod builds print an URL for the preview which is available in 3-5 minutes.
0 commit comments