Skip to content

Commit

Permalink
chore: temp. deployment
Browse files Browse the repository at this point in the history
  • Loading branch information
rmoesbergen committed Dec 6, 2024
1 parent 3afcd92 commit b349d7a
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 35 deletions.
34 changes: 4 additions & 30 deletions .github/workflows/deploy.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,8 @@ name: Deploy

on:
push:
tags:
- v*
branches:
- main
- pythonblocks
workflow_dispatch: {}

jobs:
Expand All @@ -27,31 +25,15 @@ jobs:
node-version: "20.x"
registry-url: "https://registry.npmjs.org"

- name: Create TEST env file
if: github.ref_type == 'branch'
- name: Create env file
run: |
cat << EOF > .env
VITE_BACKEND_URL="https://testleaphyeasybloqs.com"
VITE_MATOMO_URL="https://leaphyeasybloqs.com/matomo/"
VITE_MATOMO_SITE_ID="2"
VITE_SENTRY_DSN="${{ secrets.VITE_SENTRY_DSN }}"
VITE_SENTRY_SAMPLE_RATE="1.0"
EOF
echo "ENV=test" >> "$GITHUB_ENV"
echo "STACK=leaphy-webbased-test" >> "$GITHUB_ENV"
- name: Create PROD env file
if: github.ref_type == 'tag'
run: |
cat << EOF > .env
VITE_BACKEND_URL="https://leaphyeasybloqs.com"
VITE_MATOMO_URL="https://leaphyeasybloqs.com/matomo/"
VITE_MATOMO_SITE_ID="1"
VITE_SENTRY_DSN="${{ secrets.VITE_SENTRY_DSN }}"
VITE_SENTRY_SAMPLE_RATE="0.0"
EOF
echo "ENV=prod" >> "$GITHUB_ENV"
echo "STACK=leaphy-webbased" >> "$GITHUB_ENV"
echo "ENV=python" >> "$GITHUB_ENV"
echo "STACK=leaphy-webbased-python" >> "$GITHUB_ENV"
- name: Build application
env:
Expand All @@ -72,11 +54,3 @@ jobs:
- name: Redeploy
run: |
curl https://admin.leaphyeasybloqs.com/hooks/update-docker-image?stack=$STACK -H "X-Token: ${{ secrets.WEBHOOK_TOKEN }}"
- name: Clean up old images
uses: actions/delete-package-versions@v5
with:
package-name: "leaphy-webbased-svelte/leaphy-webbased-svelte"
package-type: "container"
min-versions-to-keep: 5
delete-only-untagged-versions: "true"
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"@fortawesome/free-solid-svg-icons": "6.6.0",
"@leaphy-robotics/avrdude-webassembly": "1.7.0",
"@leaphy-robotics/dfu-util-wasm": "^1.0.2",
"@leaphy-robotics/leaphy-blocks": "3.2.1",
"@leaphy-robotics/leaphy-blocks": "^3.2.1-python",
"@leaphy-robotics/picotool-wasm": "1.0.3",
"@leaphy-robotics/webusb-ftdi": "1.0.1",
"@sentry/svelte": "8.0.0-beta.5",
Expand Down
8 changes: 4 additions & 4 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -611,10 +611,10 @@
resolved "https://registry.yarnpkg.com/@leaphy-robotics/dfu-util-wasm/-/dfu-util-wasm-1.0.2.tgz#29afcc01266655e1c7b5da0eeceb0ead48c86fd7"
integrity sha512-lvS+tJFO049b4ERYKX0HcoUtnQv76A1z9sZrAvbs7s3bvdMW0BObKmktZeJ7emcp3lU/+OJWsD2h0EY5rnkiNg==

"@leaphy-robotics/[email protected]":
version "3.2.1"
resolved "https://registry.yarnpkg.com/@leaphy-robotics/leaphy-blocks/-/leaphy-blocks-3.2.1.tgz#6d8dd8d2f8429d1f1b1aea47e94e9ef0cb2ab925"
integrity sha512-lA/u7T4/Vkiet32EG1tGMiPq3UZiI7dqSAhT0Hh/YiWUwIx1O+un7+jhjBifqLb9PaLXIRZjuAUsLUPOa4/TbQ==
"@leaphy-robotics/leaphy-blocks@^3.2.1-python":
version "3.2.1-python"
resolved "https://registry.yarnpkg.com/@leaphy-robotics/leaphy-blocks/-/leaphy-blocks-3.2.1-python.tgz#fd732ba63a3b2e1f5624d7f4e13594f74c973334"
integrity sha512-ihoaCgd09CaIlb0YcPvC12vYCxpLeU7BmTwnulsyWa3wghJwdy5qFG/8c1heNpjgB6KCv3xGj6S/G95kqlDo3w==
dependencies:
blockly "^10.4.3"

Expand Down

0 comments on commit b349d7a

Please sign in to comment.