From de6c648283621ac79c84b03b22c7e6c11f99a610 Mon Sep 17 00:00:00 2001 From: Fabien Del Olmo Date: Mon, 8 Jul 2024 08:30:42 +0200 Subject: [PATCH] Deploy osmgo.com & fix build workflow --- .github/workflows/deployOsmGo.com.yaml | 37 ++++++++++++++++++++++++++ package.json | 2 +- 2 files changed, 38 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/deployOsmGo.com.yaml diff --git a/.github/workflows/deployOsmGo.com.yaml b/.github/workflows/deployOsmGo.com.yaml new file mode 100644 index 00000000..71524f6f --- /dev/null +++ b/.github/workflows/deployOsmGo.com.yaml @@ -0,0 +1,37 @@ +name: Deployment to dev.osmgo.com + +on: + push: + branches: + - master + +jobs: + deployment: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - uses: actions/setup-node@v3 + with: + node-version: 20 + + - name: Install dependencies + run: npm ci + + - name: Run tests + run: npm run test:ci + + - name: Create build + run: npm run build + + - name: rsync deployments + if: success() + uses: burnett01/rsync-deployments@6.0.0 + with: + switches: -avzr --delete + path: www/ + remote_path: ${{ secrets.PROD_OSMGO_DEPLOY_PATH }} + remote_host: osmgo.com + remote_port: 22 + remote_user: ${{ secrets.OSMGO_SRV_USER }} + remote_key: ${{ secrets.OSMGO_SRV_KEY }} diff --git a/package.json b/package.json index f7a40547..6faa72bc 100644 --- a/package.json +++ b/package.json @@ -10,7 +10,7 @@ "config": "ts-node --project ./scripts/tsconfig.json ./src/environments/set-env.ts", "start": "npm run config PWA && ng serve --host 0.0.0.0", "build": "npm run config PWA && ng build --configuration production", - "buildAndroid": "node ./incrementVersion.js && npm run config Android && ionic build --prod --release && npx cap sync && npx cap open android", + "buildAndroid": "npm run config Android && node ./incrementVersion.js && ionic build --prod --release && npx cap sync && npx cap open android", "buildAndroidDebug": "npm run config Android && ng build --configuration development && npx cap sync", "test": "npm run config && ng test --ts-config src/tsconfig.spec.json --browsers Chrome", "test:coverage": "npm run config && npm run test -- --code-coverage",