-
Notifications
You must be signed in to change notification settings - Fork 17
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge branch 'develop' into dev-tools/deny-external
- Loading branch information
Showing
382 changed files
with
4,823 additions
and
6,662 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,62 @@ | ||
name: Preview Deploy for Apps Backend | ||
|
||
env: | ||
VERCEL_ORG_ID: ${{ secrets.VERCEL_ORG_ID }} | ||
VERCEL_PROJECT_ID: ${{ secrets.APPS_BACKEND_VERCEL_PROJECT_ID }} | ||
|
||
on: | ||
pull_request: | ||
paths: | ||
- "apps/apps-backend/**" | ||
- ".github/workflows/apps-backend-preview.deploy.yml" | ||
|
||
jobs: | ||
deploy-preview: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: [self-hosted] | ||
steps: | ||
- uses: actions/checkout@eef61447b9ff4aafe5dcd4e0bbf5d482be7e7871 # pin@v4 | ||
- uses: pnpm/action-setup@fe02b34f77f8bc703788d5817da081398fad5dd2 # pin@v4 | ||
- name: Install Nodejs | ||
uses: actions/setup-node@0a44ba7841725637a19e28fa30b79a866c81b0a6 # pin@v4 | ||
with: | ||
node-version: "20" | ||
cache: "pnpm" | ||
- name: Install dependencies | ||
run: pnpm install --frozen-lockfile | ||
- name: Turbo Cache | ||
id: turbo-cache | ||
uses: actions/cache@3624ceb22c1c5a301c8db4169662070a689d9ea8 # pin@v4 | ||
with: | ||
path: node_modules/.cache/turbo | ||
key: turbo-${{ runner.os }}-${{ github.sha }} | ||
restore-keys: | | ||
turbo-${{ runner.os }}- | ||
- name: Install Vercel CLI | ||
run: pnpm add --global vercel@canary | ||
- name: Build the Apps Backend | ||
run: pnpm apps-backend build | ||
- name: Pull Vercel Environment | ||
run: vercel pull --yes --environment=preview --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Build Project Artifacts | ||
run: vercel build --token=${{ secrets.VERCEL_TOKEN }} | ||
- name: Deploy Project Artifacts to Vercel | ||
run: vercel deploy --prebuilt --token=${{ secrets.VERCEL_TOKEN }} > vercel_output.txt | ||
- name: Extract Deploy URL | ||
id: deploy_url | ||
run: echo "DEPLOY_URL=$(cat vercel_output.txt | awk 'END{print}')" >> $GITHUB_OUTPUT | ||
- name: Comment on pull request | ||
uses: actions/github-script@60a0d83039c74a4aee543508d2ffcb1c3799cdea # pin@v7 | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
script: | | ||
const DEPLOY_URL = '${{ steps.deploy_url.outputs.DEPLOY_URL }}' | ||
const COMMIT_SHA = '${{ github.event.pull_request.head.sha }}' | ||
github.rest.issues.createComment({ | ||
issue_number: context.issue.number, | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
body: `This pull request has been deployed to Vercel.\n\n\nLatest commit: ${COMMIT_SHA}\n\n:white_check_mark: Preview: ${DEPLOY_URL}` | ||
}) |
This file was deleted.
Oops, something went wrong.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
Oops, something went wrong.