This repository has been archived by the owner on May 8, 2024. It is now read-only.
style: run prettier #15
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: cicd | |
on: | |
push: | |
branches: [main] | |
pull_request: | |
branches: [main] | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: pnpm/[email protected] | |
with: | |
version: latest | |
- name: Use Node.js LTS | |
uses: actions/setup-node@v3 | |
with: | |
cache: pnpm | |
- run: pnpm install | |
- run: pnpm --version | |
- run: pnpm build | |
remote-ssh-command: | |
if: github.event_name == 'push' && (github.ref == 'refs/heads/main') | |
needs: [build] | |
runs-on: ubuntu-latest | |
steps: | |
- name: executing remote ssh commands using ssh key | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.KEY }} | |
port: ${{ secrets.PORT }} | |
script: | | |
cd ~/frontend | |
git fetch --all && git reset --hard origin/main |