Merge pull request #1466 from NicoPennec/fix/various #285
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 Kitsu to staging environment | |
on: | |
push: | |
branches: | |
- master | |
jobs: | |
build: | |
if: github.repository_owner == 'cgwire' | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Update Kitsu on staging server | |
uses: appleboy/[email protected] | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
port: ${{ secrets.PORT }} | |
script_stop: true | |
script: | | |
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 | |