Skip to content

Docker Build & Deploy #1374

Docker Build & Deploy

Docker Build & Deploy #1374

Workflow file for this run

name: Docker Build & Deploy
on:
schedule:
- cron: '0 9 * * *'
workflow_dispatch:
# push:
# # Run `master` as Docker `latest` image.
# branches: [ master ]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Build mbtiles
run: |
docker run \
-e db_host=${{ secrets.DB_HOST }} \
-e db_port=${{ secrets.DB_PORT }} \
-e db_name=${{ secrets.DB_NAME }} \
-e db_user=${{ secrets.DB_USER }} \
-e db_password=${{ secrets.db_password }} \
-v ./data:/tmp/src/data \
-v ./public:/tmp/src/public \
-v ./config.js:/tmp/src/config.js \
-v ./config-search.js:/tmp/src/config-search.js \
${{ vars.DOCKER_IMAGE }}
- name: Push mbtiles to github
if: ${{ github.ref == 'refs/heads/master' }}
env:
NODE_AUTH_TOKEN: ${{secrets.GITHUB_TOKEN}}
run: |
git config --global user.name "nawasco+githubci"
git config --global user.email "nawasco+githubci@users.noreply.github.com"
git remote set-url origin https://x-access-token:${NODE_AUTH_TOKEN}@github.com/nawasco/vt.git
git add .
git commit -m "update vectortiles"
git push origin master
- name: Deploy 🚀
uses: JamesIves/github-pages-deploy-action@v4
if: ${{ github.ref == 'refs/heads/master' }}
with:
branch: gh-pages # The branch the action should deploy to.
folder: public # The folder the action should deploy.