Skip to content

Commit

Permalink
Merge pull request #81 from alexarts74/pull-request
Browse files Browse the repository at this point in the history
Adding upload command to starter kit
  • Loading branch information
moufmouf authored May 30, 2024
2 parents a5fb75f + 7e861c5 commit 5565d38
Show file tree
Hide file tree
Showing 4 changed files with 19,852 additions and 5,534 deletions.
8 changes: 4 additions & 4 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,23 +28,23 @@ jobs:

- name: Use API key from secrets
env:
API_KEY: ${{ secrets.API_KEY }}
run: echo "API_KEY=${API_KEY}" >> $GITHUB_ENV
MAP_STORAGE_API_KEY: ${{ secrets.MAP_STORAGE_API_KEY }}
run: echo "MAP_STORAGE_API_KEY=${MAP_STORAGE_API_KEY}" >> $GITHUB_ENV

- name: Use URL Map STORAGE from secrets
env:
URL_MAP_STORAGE: ${{ secrets.URL_MAP_STORAGE }}
run: echo "URL_MAP_STORAGE=${URL_MAP_STORAGE}" >> $GITHUB_ENV

- name: Generate .env.secret
run: echo "API_KEY=${{ secrets.API_KEY }}" > .env.secret
run: echo "MAP_STORAGE_API_KEY=${{ secrets.MAP_STORAGE_API_KEY }}" > .env.secret

- name: Extract UPLOAD_MODE from .env
run: echo "UPLOAD_MODE=$(grep UPLOAD_MODE .env | cut -d '=' -f2)" >> $GITHUB_ENV

- name: Deploy in MAP STORAGE
if: ${{ env.UPLOAD_MODE == 'MAP_STORAGE' }}
run: npx @workadventure/upload-maps upload.js
run: npm run upload-only

- name: Deploy on GITHUB PAGES
if: ${{ env.UPLOAD_MODE == 'GH_PAGES' }}
Expand Down
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,5 @@ dist-ssr
*.njsproj
*.sln
*.sw?
.env.secret
dist.zip
Loading

0 comments on commit 5565d38

Please sign in to comment.