Skip to content
This repository has been archived by the owner on Jul 4, 2024. It is now read-only.

Merge pull request #35 from wmde/feat/deprecation-notice-in-readme-20… #67

Merge pull request #35 from wmde/feat/deprecation-notice-in-readme-20…

Merge pull request #35 from wmde/feat/deprecation-notice-in-readme-20… #67

Workflow file for this run

name: Build and Deploy to Toolforge
on:
push:
branches:
- main
- gh-actions/**
jobs:
build-deploy:
name: Build and Deploy
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setting up Node.js v10
uses: actions/setup-node@v1
with:
node-version: 10.x
- name: Installing dependencies
run: npm ci
- name: Building Vue.js app
run: npm run build
- name: Preparing code to sync
run: npm prune --production
- name: Syncing code to Toolforge
uses: appleboy/scp-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
source: "./"
target: "www/js"
rm: true
- name: Deploy and restart server
uses: appleboy/ssh-action@master
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
passphrase: ${{ secrets.PASSPHRASE }}
script: |
become connecting-senses rm -rf www
cp -rv www ~tools.connecting-senses/
become connecting-senses take www
become connecting-senses cp .env www/js/.env
become connecting-senses webservice --backend=kubernetes node10 restart