diff --git a/.github/workflows/deploy_workflow.yml b/.github/workflows/deploy_workflow.yml index 9770ca0..702f11e 100644 --- a/.github/workflows/deploy_workflow.yml +++ b/.github/workflows/deploy_workflow.yml @@ -48,14 +48,6 @@ jobs: - uses: actions/checkout@v4 - name: Composer install run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist - - name: NPM Install - uses: actions/setup-node@v3 - with: - node-version: 12.14 - - name: NPM Setup - run: | - npm install - npm run dev - name: Deploy to Prod uses: deployphp/action@v1 with: @@ -72,14 +64,6 @@ jobs: - uses: actions/checkout@v4 - name: Composer install run: composer install -q --no-ansi --no-interaction --no-scripts --no-suggest --no-progress --prefer-dist - - name: NPM Install - uses: actions/setup-node@v3 - with: - node-version: 12.14 - - name: NPM Setup - run: | - npm install - npm run dev - name: Deploy to Dev uses: deployphp/action@v1 with: diff --git a/deploy.php b/deploy.php index e0db641..2685ada 100644 --- a/deploy.php +++ b/deploy.php @@ -38,6 +38,14 @@ upload('.env', get('deploy_path') . '/shared'); }); +task('build', function() { + $stage = null; + if (input()->hasArgument('stage')) { + $stage = input()->getArgument('stage'); + } + run("npm ci && npm run $stage"); +}); + host('snaccooperative.org') ->set('hostname', 'snaccooperative.org') ->set('labels', ['env' => 'production', 'stage' => 'production']) @@ -68,4 +76,5 @@ 'artisan:queue:restart', 'deploy:symlink', 'deploy:cleanup', + 'build' ]);