fix(constants/images): fix link to Bacon and Eggs (#18) #19
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: PROD workflow | |
on: | |
push: | |
branches: [master] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [16.x] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Use Node.js ${{ matrix.node-version }} | |
uses: actions/setup-node@v1 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install deps | |
run: yarn | |
- name: Stop process | |
if: failure() | |
run: exit 1 | |
- name: Read package.json | |
uses: tyankatsu0105/read-package-version-actions@v1 | |
id: package-version | |
- name: Build PROD | |
run: yarn build | |
env: | |
CI: true | |
- name: Deploy to server | |
uses: appleboy/scp-action@master | |
env: | |
HOST: ${{ secrets.HOST }} | |
USERNAME: ${{ secrets.USER }} | |
KEY: ${{ secrets.SSHKEY }} | |
with: | |
strip_components: 1 | |
source: "." | |
target: "/opt/www/dst-cookbook.recats.digital" | |
- name: executing ssh commands | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USER }} | |
key: ${{ secrets.SSHKEY }} | |
script: | | |
export NVM_DIR=~/.nvm | |
source ~/.nvm/nvm.sh | |
cd /opt/www/dst-cookbook.recats.digital/ | |
echo $PATH | |
yarn | |
yarn pm2start | |
- name: recats ci | |
run: curl -H "Content-Type:application/json" -X POST ${{ secrets.CI_ENDPOINT }} -d '{"user":"stk-dmitry","repository":"dont-starve-together-cookbook","branch":"master","description":"Version - ${{ steps.package-version.outputs.version }}"}' |