Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
74 changes: 74 additions & 0 deletions .github/workflows/deploy.preview.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Deploy SMSWithoutBorders Documentation on Server (preview)

on:
push:
branches:
- preview

permissions:
contents: read

concurrency:
group: preview-deploy
cancel-in-progress: true

jobs:
deploy:
name: Build and Deploy
runs-on: ubuntu-latest
environment:
name: preview
url: https://preview-7.relaysms.afkanerd.de
steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 22

- name: Enable Corepack and activate pnpm
run: |
corepack enable
corepack prepare pnpm --activate

- name: Install dependencies
run: pnpm install --no-lockfile

- name: Build application
run: pnpm build

- name: Clean remote target directory
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
script: |
set -e
find "${{ secrets.BUILD_PATH }}" -mindepth 1 -delete

- name: Copy build artifacts to server
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
source: "./build/*"
target: ${{ secrets.BUILD_PATH }}
strip_components: 1
rm: false

- name: Run remote deploy script
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
script: |
set -e
echo "::group::Deploying preview build"
${{ secrets.BUILD_CMD }}
echo "Deploy command finished successfully."
echo "::endgroup::"
74 changes: 74 additions & 0 deletions .github/workflows/deploy.production.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,74 @@
name: Deploy SMSWithoutBorders Documentation on Server (production)

on:
push:
branches:
- main

permissions:
contents: read

concurrency:
group: production-deploy
cancel-in-progress: false

jobs:
deploy:
name: Build and Deploy
runs-on: ubuntu-latest
environment:
name: production
url: https://docs.smswithoutborders.com
steps:
- name: Checkout repository
uses: actions/checkout@v7

- name: Set up Node.js
uses: actions/setup-node@v6
with:
node-version: 22

- name: Enable Corepack and activate pnpm
run: |
corepack enable
corepack prepare pnpm --activate

- name: Install dependencies
run: pnpm install --no-lockfile

- name: Build application
run: pnpm build

- name: Clean remote target directory
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
script: |
set -e
find "${{ secrets.BUILD_PATH }}" -mindepth 1 -delete

- name: Copy build artifacts to server
uses: appleboy/scp-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
source: "./build/*"
target: ${{ secrets.BUILD_PATH }}
strip_components: 1
rm: false

- name: Run remote deploy script
uses: appleboy/ssh-action@v1
with:
host: ${{ secrets.HOST }}
username: ${{ secrets.USER }}
key: ${{ secrets.SSH_KEY }}
script: |
set -e
echo "::group::Deploying production build"
${{ secrets.BUILD_CMD }}
echo "Deploy command finished successfully."
echo "::endgroup::"
59 changes: 0 additions & 59 deletions .github/workflows/prod-deploy.yml

This file was deleted.

143 changes: 0 additions & 143 deletions .github/workflows/staging.deployment-pipeline.yaml

This file was deleted.

Loading
Loading