Skip to content

chore: update droplet secret naming for scp action #21

chore: update droplet secret naming for scp action

chore: update droplet secret naming for scp action #21

Workflow file for this run

# This workflow will do a clean installation of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Deploy to production
on:
push:
branches: [ master ]
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node-version: [16.x]
# See supported Node.js release schedule at https://nodejs.org/en/about/releases/
steps:
- uses: actions/checkout@v2
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v2
with:
node-version: ${{ matrix.node-version }}
cache: 'npm'
- run: yarn install --frozen-lockfile
- run: yarn build --if-present
# - run: yarn test
- name: Clear hosted static files before deployment
uses: appleboy/ssh-action@master
with:
host: ${{secrets.DROPLET_HOST}}
username: ${{secrets.DROPLET_USER}}
key: ${{ secrets.DROPLET_PRIVATE_KEY }}
script: |
rm -rf /var/www/domains/invoice.reactivelabs.cloud/public_html/*
- name: Deploy files to production
uses: appleboy/scp-action@master
with:
host: ${{ secrets.DROPLET_HOST }}
username: ${{ secrets.DROPLET_USER }}
key: ${{ secrets.DROPLET_PRIVATE_KEY }}
source: "./build/*"
strip_components: 1
target: "/var/www/domains/invoice.reactivelabs.cloud/public_html"
overwrite: true