update senators api #27
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 v1 | |
on: | |
push: | |
branches: | |
- main | |
jobs: | |
build: | |
name: Build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v4 | |
- name: Setup Bun | |
uses: oven-sh/setup-bun@v2 | |
with: | |
bun-version: latest | |
- run: bun install | |
- name: Echo ENV to .env | |
run: echo "${{ secrets.ENV }}" > .env | |
- name: Deploy with rsync | |
uses: burnett01/rsync-deployments@5.2 | |
with: | |
switches: -avzr --quiet --delete | |
path: ./ | |
remote_path: /var/www/screenshot-service-bun | |
remote_host: ${{ secrets.HOST }} | |
remote_user: ${{ secrets.USERNAME }} | |
remote_key: ${{ secrets.SSH_KEY }} | |
- name: Restart pm2 | |
uses: appleboy/ssh-action@master | |
with: | |
host: ${{ secrets.HOST }} | |
username: ${{ secrets.USERNAME }} | |
key: ${{ secrets.SSH_KEY }} | |
script: | | |
pm2 restart screenshot-service-bun |