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: on:
workflow_call: workflow_call:
secrets:
USER_AUTH:
required: true
jobs: jobs:
build: build:
runs-on: prox-1 runs-on: prox-1
steps: 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 - name: Checkout code
uses: actions/checkout@v4 uses: actions/checkout@v4

@ -2,16 +2,25 @@ name: deploy
on: on:
workflow_call: workflow_call:
secrets:
USER_AUTH:
required: true
jobs: jobs:
deploy: deploy:
runs-on: prox-1 runs-on: prox-1
steps: steps:
- name: Restart NextJS service - 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 - 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 - 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: jobs:
build: build:
uses: ./.github/workflows/build.yml uses: ./.github/workflows/build.yml
secrets:
USER_AUTH: ${{ secrets.USER_AUTH }}
deploy: deploy:
needs: build needs: build
uses: ./.github/workflows/deploy.yml uses: ./.github/workflows/deploy.yml
secrets:
USER_AUTH: ${{ secrets.USER_AUTH }}

Loading…
Cancel
Save