2024-05-12 00:31:12 +02:00
|
|
|
name: Build and deploy website
|
|
|
|
on:
|
2024-08-05 16:40:48 +02:00
|
|
|
workflow_dispatch:
|
2024-05-12 00:31:12 +02:00
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: docker
|
|
|
|
container:
|
2024-07-05 22:51:37 +02:00
|
|
|
image: registry.access.redhat.com/ubi9/nodejs-20:1-48.1720017855
|
2024-05-12 00:31:12 +02:00
|
|
|
steps:
|
|
|
|
- name: Checkout code
|
|
|
|
uses: actions/checkout@v4
|
|
|
|
|
|
|
|
- name: Install dependencies
|
|
|
|
run: npm install
|
|
|
|
|
|
|
|
- name: Build site
|
2024-08-05 18:50:59 +02:00
|
|
|
run: npm run build
|
|
|
|
|
|
|
|
- name: Configure SSH
|
|
|
|
run: |
|
|
|
|
mkdir -p ~/.ssh/
|
|
|
|
echo "$SSH_KEY" | tr -d '\r' > ~/.ssh/actions.key
|
|
|
|
chmod 600 ~/.ssh/actions.key
|
|
|
|
env:
|
|
|
|
SSH_KEY: ${{ secrets.WEB_SSH_KEY }}
|
|
|
|
|
|
|
|
- name: Test SSH
|
2024-08-05 19:15:13 +02:00
|
|
|
run: echo $WEB_SSH_USER && ssh -v -o "IdentitiesOnly=yes" -i ~/.ssh/actions.key $WEB_SSH_USER@be.nick-slowinski.de uptime
|
2024-08-05 19:07:04 +02:00
|
|
|
env:
|
2024-08-05 19:15:13 +02:00
|
|
|
WEB_SSH_USER: ${{ secrets.WEB_SSH_USER }}
|