Skip to content

Commit

Permalink
fix: CI
Browse files Browse the repository at this point in the history
  • Loading branch information
BQXBQX committed Apr 8, 2024
1 parent 33f5031 commit 39b0ce3
Show file tree
Hide file tree
Showing 5 changed files with 319 additions and 1,059 deletions.
53 changes: 25 additions & 28 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -13,34 +13,31 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Checkout
uses: actions/checkout@v2
with:
persist-credentials: false

- name: Install rsync
run: sudo apt-get install rsync -y

- name: Checkout repo
uses: actions/checkout@v4
- name: Install pnpm
uses: pnpm/action-setup@v2.4.0
uses: pnpm/action-setup@v2
with:
version: 8
run_install: true

- name: pnpm i
run: pnpm i

- name: Set Debug Environment Variable
run: echo "ACTIONS_RUNNER_DEBUG=true" >> $GITHUB_ENV

- name: build
run: npx craco build

- name: Deploy to Server
uses: easingthemes/[email protected]
version: latest
- name: Setup Node.js
uses: actions/setup-node@v4
with:
SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
REMOTE_USER: root
SOURCE: /build
TARGET: /www/temp
node-version: 18
cache: pnpm
- name: Install dependencies with pnpm
run: pnpm install

- name: Run build task
env:
CI: false
SENTRY_AUTH_TOKEN: ${{ secrets.SENTRY_AUTH_TOKEN }}
run: pnpm sentry

# - name: Deploy to Server
# uses: easingthemes/[email protected]
# with:
# SSH_PRIVATE_KEY: ${{ secrets.DEPLOY_KEY }}
# REMOTE_HOST: ${{ secrets.REMOTE_HOST }}
# REMOTE_USER: root
# SOURCE: /build
# TARGET: /www/temp
10 changes: 6 additions & 4 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,6 @@
"react-dom": "^18.1.0",
"react-pdf-js": "^5.1.0",
"react-router-dom": "6",
"react-scripts": "5.0.1",
"recoil": "^0.7.4",
"sass": "^1.52.3",
"sass-loader": "^13.0.0",
Expand All @@ -43,7 +42,8 @@
"scripts": {
"preinstall": "npx only-allow pnpm",
"start": "set PORT=3006 && craco start",
"build": "craco build && pnpm sentry:sourcemaps",
"build": "craco build",
"sentry": "run-s build sentry:sourcemaps",
"test": "craco test",
"eject": "react-scripts eject",
"commit": "esmo cli/git/commit/index.ts",
Expand Down Expand Up @@ -81,6 +81,8 @@
"eslint-plugin-react": "^7.30.0",
"esno": "^0.14.1",
"husky": "^8.0.1",
"prettier": "^2.6.2"
"npm-run-all2": "^6.1.2",
"prettier": "^2.6.2",
"react-scripts": "5.0.1"
}
}
}
Loading

0 comments on commit 39b0ce3

Please sign in to comment.