Skip to content

Workflow file for this run

# Credits to https://github.com/renanlecaro
name: Deploy Meteor App to Server
on:
push:
branches: [ main ]
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
environment: prod
steps:
- name: Install SSH key
uses: shimataro/ssh-key-action@v2
with:
key: ${{ secrets.SSH_KEY }}
known_hosts: ${{ secrets.KNOWN_HOSTS }}
# Test SSH connectivity (fail fast)
- name: Test ssh key to fail fast
run: ssh ${{ vars.SSH_USER }}@${{ vars.SSH_HOST }} -t "pwd"
- uses: actions/checkout@v2
- name: Get production dependencies only
run: cd ./app && npm install --production
- name: (Hack) Remove malformed package
run: find ./app/node_modules -name malformed_package_json -type d -prune -exec rm -rf "{}" \;
- name: Install mup locally
run: npm install mup
- name: Install meteor
run: curl https://install.meteor.com/ | sh
- name: Bundle the app and upload to Hoster
run: npx mup deploy
env:
SSH_USER: ${{ vars.SSH_USER }}
SSH_HOST: ${{ vars.SSH_HOST }}