From 60c26ca9f2b3a13ed497afcdeb63157c602dc67f Mon Sep 17 00:00:00 2001 From: Matt Price Date: Mon, 22 Dec 2025 10:47:27 -0500 Subject: [PATCH 1/3] Add GitHub Actions workflow for PR preview deploys MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit - Deploy project-creation-app to Netlify preview on PR open/update - Auto-comment preview URL on PR - Uses production OAuth relay (stable redirect URLs required) - Only triggers for changes in project-creation-app/ Requires GitHub secrets to be configured (see ROADMAP.md) 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/preview-deploy.yml | 48 ++++++++++++++++++++++++++++ project-creation-app/ROADMAP.md | 14 +++++++- 2 files changed, 61 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/preview-deploy.yml diff --git a/.github/workflows/preview-deploy.yml b/.github/workflows/preview-deploy.yml new file mode 100644 index 0000000..b63498e --- /dev/null +++ b/.github/workflows/preview-deploy.yml @@ -0,0 +1,48 @@ +name: Preview Deploy + +on: + pull_request: + types: [opened, synchronize, reopened] + paths: + - 'project-creation-app/**' + +jobs: + deploy-preview: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-node@v4 + with: + node-version: '20' + cache: 'npm' + cache-dependency-path: project-creation-app/package-lock.json + + - name: Install dependencies + working-directory: project-creation-app + run: npm ci + + - name: Build + working-directory: project-creation-app + env: + VITE_OAUTH_RELAY_URL: https://airtable-asana-integration-oauth.netlify.app + VITE_AIRTABLE_BASE_ID: ${{ secrets.VITE_AIRTABLE_BASE_ID }} + VITE_ASANA_TEMPLATE_GID: ${{ secrets.VITE_ASANA_TEMPLATE_GID }} + VITE_ASANA_TEAM_GID: ${{ secrets.VITE_ASANA_TEAM_GID }} + VITE_GOOGLE_SHARED_DRIVE_ID: ${{ secrets.VITE_GOOGLE_SHARED_DRIVE_ID }} + VITE_GOOGLE_PROJECTS_FOLDER_ID: ${{ secrets.VITE_GOOGLE_PROJECTS_FOLDER_ID }} + VITE_GOOGLE_SCOPING_DOC_TEMPLATE_ID: ${{ secrets.VITE_GOOGLE_SCOPING_DOC_TEMPLATE_ID }} + VITE_GOOGLE_KICKOFF_DECK_TEMPLATE_ID: ${{ secrets.VITE_GOOGLE_KICKOFF_DECK_TEMPLATE_ID }} + run: npm run build + + - name: Deploy to Netlify + uses: nwtgck/actions-netlify@v3 + with: + publish-dir: project-creation-app/dist + production-deploy: false + github-token: ${{ secrets.GITHUB_TOKEN }} + deploy-message: "Deploy from PR #${{ github.event.pull_request.number }}" + alias: pr-${{ github.event.pull_request.number }} + env: + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} + NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/project-creation-app/ROADMAP.md b/project-creation-app/ROADMAP.md index e19472c..98b0c03 100644 --- a/project-creation-app/ROADMAP.md +++ b/project-creation-app/ROADMAP.md @@ -53,7 +53,19 @@ Several project types have well-developed Asana templates with additional projec 3. Any project type without a specific template mapping falls back to `default_template_gid` 4. Template GIDs are configurable in the TOML config file for semi-technical staff to update - +## Autodeploy this app with github actions +- deploy to prod on merge to main [do not implement yet] +- ~~deploy preview links on PR creation, and push notification of deploy link as comment to the PR~~ DONE + +Deploy *only* the project creation helper app, *not* the oauth relay, as the platform oauth endpoints need a stable redirect url. + +**Setup required for preview deploys:** +Add these secrets in GitHub repo Settings > Secrets and variables > Actions: +- `NETLIFY_AUTH_TOKEN` - Create at Netlify User Settings > Applications > Personal access tokens +- `NETLIFY_SITE_ID` - `4bc49778-3108-4574-9923-1712db813c89` +- `VITE_AIRTABLE_BASE_ID`, `VITE_ASANA_TEMPLATE_GID`, `VITE_ASANA_TEAM_GID` +- `VITE_GOOGLE_SHARED_DRIVE_ID`, `VITE_GOOGLE_PROJECTS_FOLDER_ID` +- `VITE_GOOGLE_SCOPING_DOC_TEMPLATE_ID`, `VITE_GOOGLE_KICKOFF_DECK_TEMPLATE_ID` ## Add Auth0 Authentication From cf016234250d4a401fec6032804c65df9ba0dda8 Mon Sep 17 00:00:00 2001 From: Matt Price Date: Mon, 22 Dec 2025 10:55:04 -0500 Subject: [PATCH 2/3] Add root netlify.toml for monorepo base directory MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Fixes Netlify's native GitHub integration by specifying base = project-creation-app for the monorepo structure. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- netlify.toml | 27 +++++++++++++++++++++++++++ 1 file changed, 27 insertions(+) create mode 100644 netlify.toml diff --git a/netlify.toml b/netlify.toml new file mode 100644 index 0000000..ce102bf --- /dev/null +++ b/netlify.toml @@ -0,0 +1,27 @@ +# Root netlify.toml - redirects to project-creation-app subdirectory +# This allows Netlify's native GitHub integration to work with the monorepo + +[build] + base = "project-creation-app" + command = "npm run build" + publish = "dist" + +# SPA routing - redirect all routes to index.html for client-side routing +[[redirects]] + from = "/*" + to = "/index.html" + status = 200 + +# Security headers +[[headers]] + for = "/*" + [headers.values] + X-Frame-Options = "DENY" + X-Content-Type-Options = "nosniff" + Referrer-Policy = "strict-origin-when-cross-origin" + +# Cache static assets +[[headers]] + for = "/assets/*" + [headers.values] + Cache-Control = "public, max-age=31536000, immutable" From 3f29ac93333c7f34c476e7e824cd127402977490 Mon Sep 17 00:00:00 2001 From: Matt Price Date: Mon, 22 Dec 2025 11:06:19 -0500 Subject: [PATCH 3/3] Remove GitHub Actions workflow, use Netlify native integration MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Netlify's native GitHub integration already provides deploy previews automatically. The nwtgck/actions-netlify action was failing with 'Not Found' errors. Since native integration works perfectly, removed the redundant GitHub Action. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 --- .github/workflows/preview-deploy.yml | 48 ---------------------------- project-creation-app/ROADMAP.md | 12 ++----- 2 files changed, 3 insertions(+), 57 deletions(-) delete mode 100644 .github/workflows/preview-deploy.yml diff --git a/.github/workflows/preview-deploy.yml b/.github/workflows/preview-deploy.yml deleted file mode 100644 index b63498e..0000000 --- a/.github/workflows/preview-deploy.yml +++ /dev/null @@ -1,48 +0,0 @@ -name: Preview Deploy - -on: - pull_request: - types: [opened, synchronize, reopened] - paths: - - 'project-creation-app/**' - -jobs: - deploy-preview: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - - - uses: actions/setup-node@v4 - with: - node-version: '20' - cache: 'npm' - cache-dependency-path: project-creation-app/package-lock.json - - - name: Install dependencies - working-directory: project-creation-app - run: npm ci - - - name: Build - working-directory: project-creation-app - env: - VITE_OAUTH_RELAY_URL: https://airtable-asana-integration-oauth.netlify.app - VITE_AIRTABLE_BASE_ID: ${{ secrets.VITE_AIRTABLE_BASE_ID }} - VITE_ASANA_TEMPLATE_GID: ${{ secrets.VITE_ASANA_TEMPLATE_GID }} - VITE_ASANA_TEAM_GID: ${{ secrets.VITE_ASANA_TEAM_GID }} - VITE_GOOGLE_SHARED_DRIVE_ID: ${{ secrets.VITE_GOOGLE_SHARED_DRIVE_ID }} - VITE_GOOGLE_PROJECTS_FOLDER_ID: ${{ secrets.VITE_GOOGLE_PROJECTS_FOLDER_ID }} - VITE_GOOGLE_SCOPING_DOC_TEMPLATE_ID: ${{ secrets.VITE_GOOGLE_SCOPING_DOC_TEMPLATE_ID }} - VITE_GOOGLE_KICKOFF_DECK_TEMPLATE_ID: ${{ secrets.VITE_GOOGLE_KICKOFF_DECK_TEMPLATE_ID }} - run: npm run build - - - name: Deploy to Netlify - uses: nwtgck/actions-netlify@v3 - with: - publish-dir: project-creation-app/dist - production-deploy: false - github-token: ${{ secrets.GITHUB_TOKEN }} - deploy-message: "Deploy from PR #${{ github.event.pull_request.number }}" - alias: pr-${{ github.event.pull_request.number }} - env: - NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} - NETLIFY_SITE_ID: ${{ secrets.NETLIFY_SITE_ID }} diff --git a/project-creation-app/ROADMAP.md b/project-creation-app/ROADMAP.md index 98b0c03..d76dfd0 100644 --- a/project-creation-app/ROADMAP.md +++ b/project-creation-app/ROADMAP.md @@ -53,19 +53,13 @@ Several project types have well-developed Asana templates with additional projec 3. Any project type without a specific template mapping falls back to `default_template_gid` 4. Template GIDs are configurable in the TOML config file for semi-technical staff to update -## Autodeploy this app with github actions +## Autodeploy this app - deploy to prod on merge to main [do not implement yet] -- ~~deploy preview links on PR creation, and push notification of deploy link as comment to the PR~~ DONE +- ~~deploy preview links on PR creation~~ DONE (via Netlify native GitHub integration) Deploy *only* the project creation helper app, *not* the oauth relay, as the platform oauth endpoints need a stable redirect url. -**Setup required for preview deploys:** -Add these secrets in GitHub repo Settings > Secrets and variables > Actions: -- `NETLIFY_AUTH_TOKEN` - Create at Netlify User Settings > Applications > Personal access tokens -- `NETLIFY_SITE_ID` - `4bc49778-3108-4574-9923-1712db813c89` -- `VITE_AIRTABLE_BASE_ID`, `VITE_ASANA_TEMPLATE_GID`, `VITE_ASANA_TEAM_GID` -- `VITE_GOOGLE_SHARED_DRIVE_ID`, `VITE_GOOGLE_PROJECTS_FOLDER_ID` -- `VITE_GOOGLE_SCOPING_DOC_TEMPLATE_ID`, `VITE_GOOGLE_KICKOFF_DECK_TEMPLATE_ID` +**How it works:** Netlify's native GitHub integration automatically creates deploy previews for PRs. The root `netlify.toml` configures `base = "project-creation-app"` for monorepo support. Environment variables are configured in Netlify site settings (sync with `npm run env:sync:execute`). ## Add Auth0 Authentication