Merge pull request #3 from Azarattum/dependabot/npm_and_yarn/ws-8.17.1 #83
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: CI | |
on: | |
push: | |
branches: [main] | |
jobs: | |
test: | |
name: Test, Build | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Setup Node | |
uses: actions/setup-node@v1 | |
with: | |
node-version: "20.x" | |
- name: Setup pnpm | |
uses: pnpm/action-setup@v2 | |
with: | |
version: 8 | |
- name: Prepare | |
run: pnpm install | |
- name: Test | |
run: pnpm test | |
- name: Build | |
run: pnpm build | |
- name: Deploy Web | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
github_token: ${{ secrets.GITHUB_TOKEN }} | |
publish_dir: ./build/public | |
- name: Deploy Core | |
env: | |
REMOTE_SSH_KEY: ${{ secrets.REMOTE_SSH_KEY }} | |
REMOTE_IP: ${{ secrets.REMOTE_IP }} | |
run: | | |
eval $(ssh-agent -s) | |
ssh-add <(echo "$REMOTE_SSH_KEY") | |
scp -r -o "StrictHostKeyChecking no" build/* "$REMOTE_IP":/home/beta_amadeus | |
ssh -o "StrictHostKeyChecking no" "$REMOTE_IP" "rm -rf /home/beta_amadeus/public" | |
ssh-agent -k |