Skip to content

Commit

Permalink
add release
Browse files Browse the repository at this point in the history
  • Loading branch information
Soare-Robert-Daniel committed Jan 27, 2021
1 parent 4e5b2ec commit 90922af
Showing 1 changed file with 36 additions and 0 deletions.
36 changes: 36 additions & 0 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,36 @@
name: Deploy on staging

on:
release:
types: [published]

jobs:
deploy:
runs-on: ubuntu-latest
env:
SSH_USERNAME: ${{ secrets.PAGELY_SSH_USER }}
SSH_KEY: ${{ secrets.PAGELY_SSH_KEY }}
SSH_PORT: ${{ secrets.PAGELY_SSH_PORT }}
SSH_HOST: ${{ secrets.PAGELY_SSH_HOST }}
SSH_PATH: ${{ secrets.SSH_PRODUCTION_PATH }}
steps:
- name: Checkout source code
uses: actions/checkout@v2
- name: Add NodeJs
uses: actions/setup-node@v1
with:
node-version: "12"
- name: Install pmpm
run: npm add -g pnpm
- name: Build the project
run: |
pnpm install
npm run plugin-build
- name: Add SSH Key
run: |
mkdir $HOME/.ssh
echo "$SSH_KEY" > "$HOME/.ssh/key"
chmod 600 "$HOME/.ssh/key"
- name: Deploy on server
run: |
rsync -rc --delete --exclude-from="$GITHUB_WORKSPACE/.distignore" -e "ssh -i $HOME/.ssh/key -o StrictHostKeyChecking=no -p $SSH_PORT" "$GITHUB_WORKSPACE/" $SSH_USERNAME@$SSH_HOST:$SSH_PATH

0 comments on commit 90922af

Please sign in to comment.