Merge pull request #77 from ieeeuoft/update-member-phot #44
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: Deploy | |
on: | |
push: | |
branches: | |
- 'master' | |
workflow_dispatch: | |
jobs: | |
build-and-deploy: | |
runs-on: ubuntu-latest | |
environment: | |
name: production | |
url: https://ieee.utoronto.ca | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js 12.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '12.x' | |
- name: Install dependencies and build application | |
env: | |
CI: false | |
run: | | |
npm install | |
npm run build | |
- name: Transfer static files to web server root | |
uses: appleboy/scp-action@v0.1.1 | |
with: | |
host: ${{ secrets.HOST_IP }} | |
username: ${{ secrets.SSH_USER }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
overwrite: true | |
# scp-action doesn't obey working-directory, runs at repo root | |
source: "build/" | |
target: "/var/www/html/public_html" |