Skip to content

Merge remote-tracking branch 'origin/master' #209

Merge remote-tracking branch 'origin/master'

Merge remote-tracking branch 'origin/master' #209

Workflow file for this run

name: Bauen und auf Server hochladen
on:
push:
branches:
- master
- vorschau
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Node.js
uses: actions/setup-node@v1
with:
node-version: '15.x'
- name: Abhängigkeiten installieren
run: npm ci
- name: Bauen
run: npm run build --if-present
- name: .htaccess übernehmen
run: cp .htaccess dist
- name: Branch-Namen herausfinden (vorschau/master)
shell: bash
run: echo "##[set-output name=branch;]$(echo ${GITHUB_REF#refs/heads/})"
id: branch
- name: Remote directory herausfinden
uses: haya14busa/action-cond@v1
id: remote
with:
cond: ${{ steps.branch.outputs.branch == 'master' }}
if_true: "./"
if_false: "./vorschau"
- name: Branch und remote loggen
run: |
echo "Aktueller branch ist ${{ steps.branch.outputs.branch }}"
echo "Lade in Ordner ${{ steps.remote.outputs.value }} hoch"
- name: Hochladen
uses: garygrossgarten/github-action-scp@release
with:
local: "dist"
remote: ${{ steps.remote.outputs.value }}
host: ${{ secrets.HOST }}
port: ${{ secrets.PORT }}
username: ${{ secrets.USER }}
password: ${{ secrets.PASSWORD }}
rmRemote: true