-
Notifications
You must be signed in to change notification settings - Fork 50
35 lines (32 loc) · 994 Bytes
/
main.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
on:
push:
branches:
- "**"
- '!dev'
jobs:
build:
runs-on: ubuntu-latest
name: Publish Website
steps:
- uses: actions/checkout@master
# Get branch
- name: Get Branch
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: extract_branch
# FTP Copy
- name: FTP Deploy
uses: SamKirkland/[email protected]
env:
FTP_SERVER: ${{ secrets.FTP_SERVER }}
FTP_USERNAME: ${{ secrets.FTP_USERNAME }}
FTP_PASSWORD: ${{ secrets.FTP_PASSWORD }}
REMOTE_DIR: site/wwwroot/docs/${{ steps.extract_branch.outputs.branch }}
ARGS: --delete
# --delete arg will delete files on the server if you've deleted them in
# Trigger Server Refresh
- name: Trigger Refresh
uses: fjogeleit/http-request-action@master
with:
url: 'https://piranhacms.org/api/reload/${{ steps.extract_branch.outputs.branch }}'
method: 'GET'