diff --git a/.github/workflows/build-and-deploy.yml b/.github/workflows/build-and-deploy.yml index 015922b115d1..008a70bb4671 100644 --- a/.github/workflows/build-and-deploy.yml +++ b/.github/workflows/build-and-deploy.yml @@ -3,9 +3,12 @@ on: push: branches: - master + schedule: + # Run at 6 AM Eastern (11:00 UTC) + - cron: '0 11 * * *' permissions: - id-token: write # This is required for requesting the JWT - contents: read # This is required for actions/checkout + id-token: write # This is required for requesting the JWT + contents: read # This is required for actions/checkout jobs: buildSite: env: diff --git a/README.md b/README.md index 7c153d882312..41b9ba5bd003 100644 --- a/README.md +++ b/README.md @@ -75,7 +75,7 @@ The `Makefile` exposes a number of useful helpers for authoring: * `make ensure` resolves and installs all dependencies * `make lint` checks all Markdown files for correctness * `make format` formats all applicable files to ensure they conform to style guidelines -* `make serve` runs the Hugo server locally at http://localhost:1313 and watches for changes +* `make serve` runs the Hugo server locally at http://localhost:1313 and watches for changes. You can set `BUILD_FUTURE=false` to simulate production behavior by excluding future-dated content (e.g., `BUILD_FUTURE=false make serve`) * `make serve-all` does the same as `make serve`, but also watches for changes to CSS and JS source files * `make build` generates the website and writes it to `./public` * `make build-assets` builds only the CSS and JavaScript asset bundles diff --git a/scripts/build-site.sh b/scripts/build-site.sh index c0bc21bfdf06..cb7046577cb9 100755 --- a/scripts/build-site.sh +++ b/scripts/build-site.sh @@ -39,7 +39,7 @@ else export HUGO_BASEURL="https://www.pulumi-test.io" GOGC=3 hugo --minify --buildFuture --templateMetrics -e "preview" else - GOGC=3 hugo --minify --buildFuture --templateMetrics -e "production" + GOGC=3 hugo --minify --templateMetrics -e "production" fi fi diff --git a/scripts/serve.sh b/scripts/serve.sh index fe98417f7a57..77e58e7d3cd3 100755 --- a/scripts/serve.sh +++ b/scripts/serve.sh @@ -19,4 +19,10 @@ export REL_JS_BUNDLE="/js/bundle.min.${ASSET_BUNDLE_ID}.js" # URL to the Pulumi conversion service. export PULUMI_CONVERT_URL="${PULUMI_CONVERT_URL:-$(pulumi stack output --stack pulumi/tf2pulumi-service/production url)}" -HUGO_BASEURL=http://localhost:1313 hugo server --renderToMemory --disableFastRender --buildDrafts --buildFuture +# Default to building future content unless explicitly disabled +BUILD_FUTURE_FLAG="--buildFuture" +if [ "${BUILD_FUTURE:-true}" = "false" ]; then + BUILD_FUTURE_FLAG="" +fi + +HUGO_BASEURL=http://localhost:1313 hugo server --renderToMemory --disableFastRender --buildDrafts ${BUILD_FUTURE_FLAG}