Skip to content

fix: GitHub Actions failed issue #10

fix: GitHub Actions failed issue

fix: GitHub Actions failed issue #10

Workflow file for this run

# This workflow will do a clean install of node dependencies, cache/restore them, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions
name: Linode CI
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
jobs:
build-linode:
name: Test & Build for Linode
runs-on: ubuntu-latest
env:
REACT_APP_DOMAIN: poker4.fun
REACT_APP_SOCKET_SERVER_URL: https://api.poker4.fun/
REACT_APP_GA_ID: UA-104177068-1
REACT_APP_DOMAIN_EXPIRY_DATE: Jul 11, 2027
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 14
cache: yarn
- run: yarn install --frozen-lockfile
- run: yarn test
- run: yarn build
- uses: actions/upload-artifact@v3
if: ${{ github.ref == 'refs/heads/master' }}
with:
name: dist
path: build
deploy-linode:
needs: build-linode
if: ${{ github.ref == 'refs/heads/master' }}
environment: Linode
env:
ssh_key: ${{ secrets.LINODE_SSH_KEY }}
ssh_port: ${{ secrets.LINODE_SSH_PORT }}
name: Deploy to Linode
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v3
with:
name: dist
- run: echo "$ssh_key" > ~/ssh_key
- run: chmod 600 ~/ssh_key
- run: rsync -e "ssh -p $ssh_port -i ~/ssh_key -o StrictHostKeyChecking=no" -a ${{ github.workspace }}/ deploy@poker4.fun:/websites/poker