Create build-and-deploy.yml
This commit is contained in:
parent
66ac60dd82
commit
054aa5284a
1 changed files with 31 additions and 0 deletions
31
.github/workflows/build-and-deploy.yml
vendored
Normal file
31
.github/workflows/build-and-deploy.yml
vendored
Normal file
|
@ -0,0 +1,31 @@
|
||||||
|
name: Build and Deploy Site
|
||||||
|
|
||||||
|
on:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
build:
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: Setup node
|
||||||
|
uses: actions/setup-node@v1
|
||||||
|
with:
|
||||||
|
node-version: 14.x
|
||||||
|
- run: npm ci
|
||||||
|
- run: npm run build --if-present
|
||||||
|
- name: Deploy site
|
||||||
|
uses: appleboy/scp-action@v0.1.1
|
||||||
|
with:
|
||||||
|
host: ${{ secrets.HOST }}
|
||||||
|
username: ${{ secrets.USERNAME }}
|
||||||
|
password: ${{ secrets.PASSWORD }}
|
||||||
|
source: .htaccess,index.html,styles.css
|
||||||
|
target: /home/${{ secrets.USERNAME }}/sinsaludar.com
|
||||||
|
- name: Cloudflare Purge Cache
|
||||||
|
uses: jakejarvis/cloudflare-purge-action@v0.3.0
|
||||||
|
env:
|
||||||
|
CLOUDFLARE_ZONE: ${{ secrets.CLOUDFLARE_ZONE }}
|
||||||
|
CLOUDFLARE_TOKEN: ${{ secrets.CLOUDFLARE_TOKEN }}
|
Loading…
Reference in a new issue