Merge pull request #4 from corigne/corigne-patch-1 #23
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 and Publish | |
on: | |
workflow_dispatch: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build and Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: 16 | |
- name: Install dependencies | |
uses: bahmutov/npm-install@v1 | |
- name: Build Project | |
run: npm run build | |
- name: Copy to webserver folder | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
port: ${{ secrets.PORT }} | |
key: ${{ secrets.SSH_PRIVATE_KEY }} | |
source: dist/* | |
target: "/var/www/${{ secrets.DOMAIN }}" | |
strip_components: 1 |