feat(engine-cyberia): ✨ quest immunity Quest Modal Dialog logic #540
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 to Server | |
on: [push] | |
permissions: | |
contents: write | |
packages: write | |
id-token: write | |
jobs: | |
build: | |
if: github.repository == 'underpostnet/engine' && startsWith(github.event.head_commit.message, 'cd(ssh-engine)') | |
name: Remote SSH deployment | |
runs-on: ubuntu-latest | |
steps: | |
# - name: 🖊 Write SSH keys | |
# run: | | |
# install -m 600 -D /dev/null ~/.ssh/id_rsa | |
# echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa | |
# ssh-keyscan -H ${{ secrets.SSH_HOST }} > ~/.ssh/known_hosts | |
# - name: 🔗 Connect and List | |
# run: ssh ${{ secrets.SSH_USERNAME }}@${{ secrets.SSH_HOST }} "pm2 list" | |
# - name: 🧹 Cleanup | |
# run: rm -rf ~/.ssh | |
- name: SSH Deploy | |
# You may pin to the exact commit or the version. | |
# uses: easingthemes/ssh-deploy@ece05a22752e524363164bfb2f69a5ba4f8ded0d | |
uses: easingthemes/ssh-deploy@v5.1.0 | |
with: | |
# Private key part of an SSH key pair | |
SSH_PRIVATE_KEY: ${{ secrets.SSH_PRIV_KEY }} | |
# Remote host | |
REMOTE_HOST: ${{ secrets.SSH_HOST }} | |
# Remote user | |
REMOTE_USER: ${{ secrets.SSH_USERNAME }} | |
# Remote port | |
REMOTE_PORT: ${{ secrets.SSH_PORT }} # optional, default is 22 | |
# Source directory, path relative to `$GITHUB_WORKSPACE` root, eg: `dist/` | |
# SOURCE: # optional, default is | |
# Target directory | |
# TARGET: # optional, default is | |
# Arguments to pass to rsync | |
# ARGS: '-rlgoDzvc -i' # optional, default is -rlgoDzvc -i | |
# An array of ssh arguments, they must be prefixed with -o and separated by a comma, for example: -o SomeArgument=no, -o SomeOtherArgument=5 | |
# SSH_CMD_ARGS: # optional, default is -o StrictHostKeyChecking=no | |
# paths to exclude separated by `,`, ie: `/dist/, /node_modules/` | |
# EXCLUDE: # optional, default is | |
# Script to run on host machine before rsync | |
SCRIPT_BEFORE: | # optional, default is | |
pwd | |
ls -a | |
pm2 list | |
# If not an empty string, the action will fail if the before script fails. Note: The string 'false' will be treated as true | |
# SCRIPT_BEFORE_REQUIRED: # optional, default is | |
# Script to run on host machine after rsync | |
# SCRIPT_AFTER: # optional, default is | |
# If not an empty string, the action will fail if the after script fails. Note: The string 'false' will be treated as true | |
# SCRIPT_AFTER_REQUIRED: # optional, default is | |
permissions: | |
contents: write | |
packages: write | |
id-token: | |
write | |
# SSH Setup | |
# SSH Deploy | |
# mkdir -p ~/.ssh/ | |
# install -m 600 -D /dev/null ~/.ssh/id_rsa | |
# echo "${{ secrets.SSH_PRIV_KEY }}" > ~/.ssh/id_rsa | |
# echo "${{ secrets.SSH_PUB_KEY }}" > ~/.ssh/id_rsa.pub | |
# chmod 700 ~/.ssh | |
# chmod 600 ~/.ssh/id_rsa | |
# chmod 600 ~/.ssh/id_rsa.pub | |
# ssh-keyscan -H ${{ secrets.SSH_HOST }} >> ~/.ssh/known_hosts | |
# chmod 644 ~/.ssh/known_hosts | |
# ssh -i ~/.ssh/id_rsa ${{ secrets.SSH_USERNAME }}@${{secrets.SSH_HOST }} "pwd" | |
# ls -a | |
# pm2 list | |
# rsync -vrm .output/* ${{ secrets.SSH_HOST }}:${{ secrets.SSH_TARGE_PATH }} | |
# which rsync || (sudo apk update && sudo apk add rsync) | |
# which ssh-agent || (sudo apk update && sudo apk add openssh-client) |