From 1be567ed4ab090ab65418f1d85f304d3b0e4d02e Mon Sep 17 00:00:00 2001 From: Huang Xin Date: Mon, 30 Dec 2024 19:18:12 +0100 Subject: [PATCH] Setup CI for pull request: only build the web-app --- .github/workflows/pull-request.yml | 35 ++++++++++++++++++++++++ .github/workflows/vercel-pull-requst.yml | 25 ----------------- 2 files changed, 35 insertions(+), 25 deletions(-) create mode 100644 .github/workflows/pull-request.yml delete mode 100644 .github/workflows/vercel-pull-requst.yml diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 00000000..ad3a2f03 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,35 @@ +name: Build Web Application on Pull Request +on: + pull_request: + branches: [main] +permissions: + contents: write + pull-requests: write +jobs: + build_web_app: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: 'true' + + - name: setup pnpm + uses: pnpm/action-setup@v4 + with: + version: 9.15.1 + + - name: setup node + uses: actions/setup-node@v3 + with: + node-version: 22 + cache: pnpm + + - name: install Dependencies + working-directory: apps/readest-app + run: | + pnpm install && pnpm setup-pdfjs + + - name: build the web App + working-directory: apps/readest-app + run: | + pnpm build-web diff --git a/.github/workflows/vercel-pull-requst.yml b/.github/workflows/vercel-pull-requst.yml deleted file mode 100644 index 40fe10cb..00000000 --- a/.github/workflows/vercel-pull-requst.yml +++ /dev/null @@ -1,25 +0,0 @@ -name: Create vercel preview URL on pull request -on: - pull_request: - branches: [main, master] -permissions: - contents: write - deployments: write - pull-requests: write -jobs: - build_and_deploy: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: 'true' - - uses: amondnet/vercel-action@v25 - id: vercel-deploy - with: - vercel-token: ${{ secrets.VERCEL_TOKEN }} - github-token: ${{ secrets.GITHUB_TOKEN }} - vercel-org-id: ${{ secrets.ORG_ID}} - vercel-project-id: ${{ secrets.PROJECT_ID}} - - name: preview-url - run: | - echo ${{ steps.vercel-deploy.outputs.preview-url }}