[skip-ci] Merge pull request #150 from allerta-vvf/staging
Update CI/CD configs
This commit is contained in:
commit
9a5d65b52c
|
@ -12,8 +12,7 @@ on:
|
|||
|
||||
jobs:
|
||||
tests:
|
||||
#TODO: this is only tmp
|
||||
if: "contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
|
||||
if: "! contains(toJSON(github.event.commits.*.message), '[skip-ci]')"
|
||||
defaults:
|
||||
run:
|
||||
working-directory: ./server
|
||||
|
@ -161,11 +160,9 @@ jobs:
|
|||
|
||||
staging_deployment:
|
||||
if: github.event.ref == 'refs/heads/staging'
|
||||
# needs: tests
|
||||
needs: tests
|
||||
runs-on: ubuntu-latest
|
||||
environment: staging
|
||||
env: # Or as an environment variable
|
||||
deploy_url: ${{ secrets.DEPLOY_URL_TMP }}
|
||||
name: Deploy to staging
|
||||
steps:
|
||||
- name: Checkout
|
||||
|
@ -184,18 +181,31 @@ jobs:
|
|||
with:
|
||||
node-version: '12'
|
||||
|
||||
- name: Setup deployer
|
||||
run: |
|
||||
sudo wget -O deployment.phar https://github.com/dg/ftp-deployment/releases/download/v3.4.0/deployment.phar
|
||||
php deployment.phar
|
||||
echo "<?php $remotes = [ 'staging' => [ 'remote' => $DEPLOY_URL, 'sentry_env' => 'staging' ] ]; ?>" > deployment_remotes.php
|
||||
cat deployment_remotes.php
|
||||
- name: Deploy
|
||||
run: echo I am deploying!
|
||||
run: |
|
||||
ls
|
||||
sudo wget -O deployment.phar https://github.com/dg/ftp-deployment/releases/download/v3.4.0/deployment.phar
|
||||
echo '<?php $remotes = [ "staging" => [ "remote" => "${{ secrets.DEPLOY_URL }}", "sentry_env" => "staging" ] ]; ?>' > deployment_remotes.php
|
||||
cat deployment_remotes.php
|
||||
ls
|
||||
php deployment.phar deployment.php --section staging
|
||||
php -r 'require("deployment_remotes.php");'
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: deploy_php_log_${{ github.run_id }}
|
||||
path: /tmp/php.log
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: deploy_log_${{ github.run_id }}
|
||||
path: deployment.log
|
||||
|
||||
production_deployment:
|
||||
if: github.event.ref == 'refs/heads/production'
|
||||
# needs: tests
|
||||
needs: tests
|
||||
runs-on: ubuntu-latest
|
||||
environment: production
|
||||
name: Deploy to production
|
||||
|
@ -216,10 +226,24 @@ jobs:
|
|||
with:
|
||||
node-version: '12'
|
||||
|
||||
- name: Setup deployer
|
||||
run: |
|
||||
wget -O /usr/local/deployment.phar https://github.com/dg/ftp-deployment/releases/download/v3.4.0/deployment.phar
|
||||
php /usr/local/deployment.phar
|
||||
|
||||
- name: Deploy
|
||||
run: echo I am deploying!
|
||||
run: |
|
||||
ls
|
||||
sudo wget -O deployment.phar https://github.com/dg/ftp-deployment/releases/download/v3.4.0/deployment.phar
|
||||
echo '<?php $remotes = [ "production" => [ "remote" => "${{ secrets.DEPLOY_URL }}", "sentry_env" => "prod" ] ]; ?>' > deployment_remotes.php
|
||||
cat deployment_remotes.php
|
||||
ls
|
||||
php deployment.phar deployment.php --section production
|
||||
php -r 'require("deployment_remotes.php");'
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: deploy_php_log_${{ github.run_id }}
|
||||
path: /tmp/php.log
|
||||
|
||||
- uses: actions/upload-artifact@v2
|
||||
if: ${{ always() }}
|
||||
with:
|
||||
name: deploy_log_${{ github.run_id }}
|
||||
path: deployment.log
|
||||
|
|
|
@ -11,6 +11,8 @@ $baseConfig = [
|
|||
resources/src
|
||||
resources/node_modules
|
||||
resources/webpack*
|
||||
resources/images/logo.png
|
||||
resources/images/owner.png
|
||||
cypress
|
||||
debug_storage/exception*
|
||||
debug_storage/*.log
|
||||
|
|
Loading…
Reference in New Issue