Commit 84df7a4bb2d735a1e75cb08f60d739b96b78c2d6
1 parent
476b2b8a
chore: update ci
Showing
1 changed file
with
0 additions
and
56 deletions
.github/workflows/ftp-schedule.yml deleted
100644 → 0
1 | -name: schedule-push-to-ftp | |
2 | - | |
3 | -# Timed deployment project | |
4 | -on: | |
5 | - push: | |
6 | - schedule: | |
7 | - - cron: '0 20 * * *' | |
8 | - | |
9 | -jobs: | |
10 | - schedule-push-to-ftp: | |
11 | - runs-on: ubuntu-latest | |
12 | - steps: | |
13 | - - name: Checkout | |
14 | - uses: actions/checkout@v3 | |
15 | - | |
16 | - - name: Sed Config Base | |
17 | - shell: bash | |
18 | - run: | | |
19 | - sed -i 's#VITE_PUBLIC_PATH\s*=.*#VITE_PUBLIC_PATH = /next/#g' ./.env.production | |
20 | - sed -i "s#VITE_BUILD_COMPRESS\s*=.*#VITE_BUILD_COMPRESS = 'gzip'#g" ./.env.production | |
21 | - sed -i "s#VITE_DROP_CONSOLE\s*=.*#VITE_DROP_CONSOLE = true#g" ./.env.production | |
22 | - cat ./.env.production | |
23 | - | |
24 | - - name: use Node.js 16 | |
25 | - uses: actions/setup-node@v3 | |
26 | - with: | |
27 | - node-version: 16 | |
28 | - | |
29 | - - name: Get yarn cache | |
30 | - id: yarn-cache | |
31 | - run: echo "::set-output name=dir::$(yarn cache dir)" | |
32 | - | |
33 | - - name: Cache dependencies | |
34 | - uses: actions/cache@v3 | |
35 | - with: | |
36 | - path: ${{ steps.yarn-cache.outputs.dir }} | |
37 | - key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }} | |
38 | - restore-keys: | | |
39 | - ${{ runner.os }}-yarn- | |
40 | - | |
41 | - - name: Build | |
42 | - run: | | |
43 | - yarn install | |
44 | - yarn run build | |
45 | - | |
46 | - - name: Deploy | |
47 | - uses: SamKirkland/FTP-Deploy-Action@2.0.0 | |
48 | - env: | |
49 | - FTP_SERVER: ${{ secrets.FTP_SERVER }} | |
50 | - FTP_USERNAME: ${{ secrets.FTP_USERNAME }} | |
51 | - FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }} | |
52 | - METHOD: sftp | |
53 | - PORT: ${{ secrets.FTP_PORT }} | |
54 | - LOCAL_DIR: dist | |
55 | - REMOTE_DIR: /srv/www/vben-admin | |
56 | - ARGS: --delete --verbose --parallel=80 |