2FA page rework + hot-fix end #29
Workflow file for this run
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: Node.js CI | |
on: | |
push: | |
branches: [ "main" ] | |
pull_request: | |
branches: [ "main" ] | |
workflow_dispatch: | |
jobs: | |
build-node: | |
runs-on: ubuntu-latest | |
if: github.event_name == 'pull_request' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Setup Node.js 20 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: "20" | |
cache: npm | |
- name: Install dependencies | |
run: npm ci --omit=dev | |
- name: Build Node.js site | |
run: npm run build | |
build-docker: | |
runs-on: self-hosted | |
if: github.event_name != 'pull_request' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Build Docker image | |
run: docker build -t docker.politcubes.com/politcubes/wiki . | |
- name: Login to Nexus | |
if: success() | |
uses: docker/login-action@v3 | |
with: | |
registry: docker.politcubes.com | |
username: ${{ secrets.NEXUS_USERNAME }} | |
password: ${{ secrets.NEXUS_PASSWORD }} | |
- name: Push image to Nexus | |
if: success() | |
run: docker push docker.politcubes.com/politcubes/wiki |