Compare commits

...
Sign in to create a new pull request.

4 commits

3 changed files with 12 additions and 11 deletions

View file

@ -44,14 +44,19 @@ jobs:
run: |
BRANCH=${{ github.ref_name }}
THEME=${BRANCH:6}
mv "dist_$THEME" ${{ github.ref_name }}
zip ${{ github.ref_name }}.zip -r ${{ github.ref_name }}/*
zip dist_$THEME.zip -r dist_$THEME/*
- name: uploading file
run: scp ${{ github.ref_name }}.zip hetzner:/root/staging/
run: |
BRANCH=${{ github.ref_name }}
THEME=${BRANCH:6}
scp dist_$THEME.zip hetzner:/root/staging/dist_$THEME.zip
- name: unzipping remote file
run: ssh hetzner "cd /root/staging && unzip ${{ github.ref_name }}.zip && rm -rf /root/single_theme_builds/${{ github.ref_name }} && mv /root/staging/${{ github.ref_name }}/ /root/single_theme_builds/ && rm ${{ github.ref_name }}.zip"
run: |
BRANCH=${{ github.ref_name }}
THEME=${BRANCH:6}
ssh hetzner "cd /root/staging && unzip dist_$THEME.zip && rm -rf /root/single_theme_builds/$THEME && mkdir -p /root/single_theme_builds/$THEME && mv /root/staging/dist_$THEME/* /root/single_theme_builds/$THEME/ && rm dist_$THEME.zip && rmdir dist_$THEME/"

View file

@ -82,6 +82,7 @@
"strt": "vite --host | sed 's/localhost:/127.0.0.1:/g'",
"build": "./scripts/build.sh",
"build:single": "./scripts/single_build.sh",
"build:vite:single": "vite build --sourcemap --config vite_single.config.js",
"build:dbscript": "vite-node ./scripts/osm2pgsql/generateBuildDbScript.ts",
"prepare-deploy": "npm run generate:service-worker && ./scripts/prepare-build.sh && npm run build",
"watch:css": "tailwindcss -i src/index.css -o public/css/index-tailwind-output.css --watch",

View file

@ -44,7 +44,7 @@ sed -i "s/\/\/ LAYOUT.ADD_CONFIG/layout.enableMoreQuests = false/" index_"$THEME
export NODE_OPTIONS=--max-old-space-size=20000
vite build --sourcemap --config vite_single.config.js || { echo 'Vite build failed' ; exit 1; }
npm run build:vite:single || { echo 'Vite build failed' ; exit 1; }
cp -r assets/layers/ dist/assets/layers/
@ -96,9 +96,4 @@ then
fi
npm run clean
echo "BUILD COMPLETED"
echo "On what domain will you deploy?"
echo " ! Don't forget to add `https://yourdomain.tld/land.html` to the Redirect URIs on https://www.openstreetmap.org/oauth2/applications/"
echo "Deploying on github pages?"
echo " 1. Don't forget to add a CNAME file (containing your domain name verbatim, without protocol)"
echo " 2 .nojekyll file (which is empty)"
echo "BUILD COMPLETED. Files are in dist_$1"