sinsaludar.com/.github/workflows/build-and-deploy.yml
2021-09-22 11:44:36 -04:00

31 lines
872 B
YAML

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 }}