Merge pull request #10 from corigne/dev #37
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/[email protected] | |
- name: Install dependencies | |
uses: bahmutov/[email protected] | |
- 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: build/* | |
target: "/var/www/${{ secrets.DOMAIN }}" | |
strip_components: 1 |