Files
2026-10-21 05:12:42 +03:00

61 lines
1.8 KiB
YAML

name: Deploy & Release
on:
push:
branches: [ main ]
tags: [ 'v*' ]
jobs:
build-and-deploy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v3
- name: Setup Node.js
uses: actions/setup-node@v3
with:
node-version: 20
- name: Validate Datasets & Syntax
run: |
node -e "JSON.parse(require('fs').readFileSync('catenary_dv.json')); JSON.parse(require('fs').readFileSync('trackdata_dv.json')); JSON.parse(require('fs').readFileSync('poi_dv.json')); console.log('Datasets valid!');"
node --check index.js
node --check legend.js
node --check config.js
node --check js/mapdata.js
echo "All JS syntax checks passed!"
- name: Upload Web Map Artifact
uses: actions/upload-artifact@v3
with:
name: dv-community-map-catenary
path: |
index.html
style.css
config.js
legend.js
index.js
mapSprites.svg
favicon.png
opengraph.png
catenary_dv.json
trackdata_dv.json
poi_dv.json
shop_items.json
js/
terrains/
- name: Package Web Map Zip
run: |
zip -r dv-community-map-web.zip index.html style.css config.js legend.js index.js mapSprites.svg favicon.png opengraph.png catenary_dv.json trackdata_dv.json poi_dv.json shop_items.json js/ terrains/
- name: Create Gitea Release
if: startsWith(github.ref, 'refs/tags/')
uses: akkuman/gitea-release-action@v1
with:
files: |-
dv-community-map-web.zip
catenary_dv.json
trackdata_dv.json