Merge pull request #26 from Lapikud/main

Up to date with master
pull/31/head
Renkar 4 months ago committed by GitHub
commit 0c25c48ced
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
  1. 8
      .github/workflows/build.yml
  2. 15
      .github/workflows/deploy.yml
  3. 4
      .github/workflows/main.yml

@ -2,11 +2,19 @@ name: build
on:
workflow_call:
secrets:
USER_AUTH:
required: true
jobs:
build:
runs-on: prox-1
steps:
- name: Clear .next cache
env:
SUDO_PASSWORD: ${{ secrets.USER_AUTH }}
run: echo "$SUDO_PASSWORD" | sudo -S rm -rf $GITHUB_WORKSPACE/.next
- name: Checkout code
uses: actions/checkout@v4

@ -2,16 +2,25 @@ name: deploy
on:
workflow_call:
secrets:
USER_AUTH:
required: true
jobs:
deploy:
runs-on: prox-1
steps:
- name: Restart NextJS service
run: sudo systemctl restart nextjs.service
env:
SUDO_PASSWORD: ${{ secrets.USER_AUTH }}
run: echo "$SUDO_PASSWORD" | sudo -S systemctl restart nextjs.service
- name: Reload systemd daemon
run: sudo systemctl daemon-reload
env:
SUDO_PASSWORD: ${{ secrets.USER_AUTH }}
run: echo "$SUDO_PASSWORD" | sudo -S systemctl daemon-reload
- name: Check service status
run: sudo systemctl status nextjs.service --no-pager
env:
SUDO_PASSWORD: ${{ secrets.USER_AUTH }}
run: echo "$SUDO_PASSWORD" | sudo -S systemctl status nextjs.service --no-pager

@ -8,7 +8,11 @@ on:
jobs:
build:
uses: ./.github/workflows/build.yml
secrets:
USER_AUTH: ${{ secrets.USER_AUTH }}
deploy:
needs: build
uses: ./.github/workflows/deploy.yml
secrets:
USER_AUTH: ${{ secrets.USER_AUTH }}

Loading…
Cancel
Save