Skip to content

1.0.4

1.0.4 #762

Workflow file for this run

---
name: Deploy Kitsu to staging environment
on:
push:
branches:
- main
env:
NODE_OPTIONS: --max_old_space_size=8192
HUSKY: 0
jobs:
deploy:
if: github.repository_owner == 'cgwire'
name: Deploy to staging
runs-on: ubuntu-latest
steps:
- name: Update Kitsu on staging server
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USERNAME }}
key: ${{ secrets.KEY }}
port: ${{ secrets.PORT }}
envs: HUSKY,NODE_OPTIONS
script: |
set -e
echo "Node.js $(node -v)"
echo "npm v$(npm -v)"
cd /opt/kitsu
git pull
npm ci
npm run build
GIT_COMMIT="$(git rev-parse HEAD)"
GIT_TAG="$(git describe --tags)"
KITSU_VERSION="$(echo ${GIT_TAG} | sed 's/^v//;s/-build//')"
echo "${KITSU_VERSION}" > dist/.version.txt
echo "${GIT_COMMIT}" > dist/.commit.txt
echo "${GIT_TAG}" > dist/.tag.txt