undo faulty pem change #18
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
# 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: cd ./deploy && npx mup deploy | |
env: | |
SSH_USER: ${{ vars.SSH_USER }} | |
SSH_HOST: ${{ vars.SSH_HOST }} | |
DOMAIN: ${{ vars.DOMAIN }} | |
PROXY_PORT: ${{ vars.PROXY_PORT }} |