This repository has been archived by the owner on Oct 17, 2024. It is now read-only.
Merge pull request #99 from TeamSekai/feature/92-perms #132
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: Code Test and Deploy | |
on: | |
push: | |
branches: | |
- '**' | |
- '!v14-stable' | |
jobs: | |
test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
- name: Unit test | |
run: | | |
node -v | |
npm install | |
cp config.json.example config.json | |
npm test | |
deploy: | |
runs-on: ubuntu-22.04 | |
needs: test | |
steps: | |
- name: Generate key and set path | |
run: | | |
mkdir -p .ssh && chmod 700 .ssh | |
echo "${{ secrets.SSH_KEY }}" > .ssh/id_rsa && chmod 600 .ssh/id_rsa | |
- name: Deploy Sekai | |
run: | | |
ssh -i .ssh/id_rsa -o "StrictHostKeyChecking=no" ${{ secrets.SERVER_USERNAME }}@${{ secrets.SERVER_HOST }} -p ${{ secrets.SSH_PORT }} "bash -x deploysekai.sh" |