misc fixes #440
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Deploy website | |
on: | |
push: | |
tags: 'v*' | |
branches: | |
- "dev" | |
jobs: | |
web-deploy: | |
name: Deploy | |
runs-on: ubuntu-latest | |
steps: | |
- name: "Setup node" | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '18' | |
- name: Get latest code | |
uses: actions/checkout@v2 | |
- name: "Install modules" | |
run: "npm run install:ci" | |
- name: "Generate build information json" | |
run: "node generateInfo.js" | |
- name: "Edit package.json for web deployment" | |
run: "node editPackageWeb.js" | |
- name: Build web | |
run: npm run build:web | |
- name: "Package JSON" | |
run: | | |
echo "INFO_VERSION=$(jq -r .version ./src/info.json)" >> $GITHUB_ENV | |
echo "INFO_BRANCH=$(jq -r .branch ./src/info.json)" >> $GITHUB_ENV | |
echo "INFO_TIMESTAMP=$(jq -r .timestamp ./src/info.json)" >> $GITHUB_ENV | |
- name: Deploy | |
uses: SamKirkland/[email protected] | |
with: | |
server: ${{ secrets.server }} | |
username: ${{ secrets.username }} | |
password: ${{ secrets.password }} | |
local-dir: ./build/ | |
dangerous-clean-slate: true | |
server-dir: /var/www/mtgatool-app/ |