Skip to content

Docker Build & Deploy #936

Docker Build & Deploy

Docker Build & Deploy #936

Workflow file for this run

name: Docker Build & Deploy
on:
schedule:
- cron: '0 9 * * *'
# push:
# # Run `master` as Docker `latest` image.
# branches: [ master ]
jobs:
build:
name: build
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Build mbtiles
env:
db_user: ${{ secrets.DB_USER }}
db_password: ${{ secrets.DB_PASSWORD }}
db_host: ${{ secrets.DB_HOST }}
db_port: ${{ secrets.DB_PORT }}
db_name: ${{ secrets.DB_NAME }}
run: docker-compose up
- 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@4.1.7
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.