This repository has been archived by the owner on Mar 31, 2024. It is now read-only.
Update Naturkundemuseum_Vorgarten.json #359
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: build page and deploy page and maps | |
on: | |
push: | |
branches: [ main, hierkommtdiemaus ] | |
pull_request: | |
branches: [ main ] | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: ruby/setup-ruby@v1 | |
with: | |
ruby-version: '3.0' # Not needed with a .ruby-version file | |
bundler-cache: true # runs 'bundle install' and caches installed gems automatically | |
- name: Optimize map | |
uses: thecodingmachine/map-optimizer-action@master | |
- if: github.event_name == 'push' && github.ref_name == 'main' | |
name: build jekyll page for production | |
run: | | |
bundle config path vendor/bundle | |
bundle install | |
bundle exec jekyll build | |
- if: github.event_name == 'push' && github.ref_name != 'main' | |
name: build jekyll page for preview | |
run: | | |
bundle config path vendor/bundle | |
bundle install | |
bundle exec jekyll build -b ${{ github.ref_name }} | |
- name: upload to production | |
if: github.event_name == 'push' && github.ref_name == 'main' | |
env: | |
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
SSH_USER: ${{ secrets.SSH_USER }} | |
run: | | |
eval "$(ssh-agent -s)" | |
ssh-add - <<< "${SSH_KEY}" | |
mkdir ~/.ssh | |
ssh-keyscan -H ${SSH_HOST} >> ~/.ssh/known_hosts | |
scp -r _site/* ${SSH_USER}@${SSH_HOST}:/world.naturkunde.museum/ | |
- name: upload to preview | |
if: github.event_name == 'push' && github.ref_name != 'main' | |
env: | |
SSH_KEY: ${{ secrets.SSH_PRIVATE_KEY }} | |
SSH_HOST: ${{ secrets.SSH_HOST }} | |
SSH_USER: ${{ secrets.SSH_USER }} | |
run: | | |
eval "$(ssh-agent -s)" | |
ssh-add - <<< "${SSH_KEY}" | |
mkdir ~/.ssh | |
ssh-keyscan -H ${SSH_HOST} >> ~/.ssh/known_hosts | |
scp -r _site/* ${SSH_USER}@${SSH_HOST}:/world.naturkunde.museum/${{ github.ref_name }} |