refuel.mixedup.dev/.gitea/workflows/deploy.yaml

66 lines
2.1 KiB
YAML
Raw Normal View History

2025-01-25 17:17:58 +01:00
name: Build and Deploy
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build_and_deploy:
runs-on: ubuntu-latest
container:
image: mcr.microsoft.com/devcontainers/dotnet
steps:
2025-01-25 17:46:21 +01:00
- name: Install APT dependencies
2025-01-25 17:55:35 +01:00
run: |
2025-01-25 17:56:48 +01:00
apt update -y && apt install -y \
2025-01-25 17:55:35 +01:00
git \
nodejs \
libglib2.0-0 \
libnss3 \
libnspr4 \
libdbus-1-3 \
libatk1.0-0 \
libatk-bridge2.0-0 \
libcups2 \
libdrm2 \
libxcb1 \
libxkbcommon0 \
libx11-6 \
libxcomposite1 \
libxdamage1 \
libxext6 \
libxfixes3 \
libxrandr2 \
libgbm1 \
libpango-1.0-0 \
libcairo2 \
libasound2 \
libatspi2.0-0
2025-01-25 17:22:39 +01:00
- name: Install .NET Tools
2025-01-25 17:46:21 +01:00
run: dotnet tool update -g docfx
- name: Add NuGet Sources
2025-01-26 13:10:40 +01:00
run: |
dotnet nuget add source -n ReFuel -u ${{vars.NUGET_USER_NAME}} -p ${{secrets.REFUEL_API_KEY}} --store-password-in-clear-text ${{vars.NUGET_INDEX}}
dotnet nuget add source -n CallumDev -u ${{ vars.GH_USERNAME }} -p ${{ secrets.GH_API_KEY }} --store-password-in-clear-text https://nuget.pkg.github.com/CallumDev/index.json
2025-01-25 17:17:58 +01:00
- name: Checkout Repository
uses: actions/checkout@v4
with:
submodules: recursive
2025-01-25 17:44:43 +01:00
token: ${{secrets.REFUEL_API_KEY}}
2025-01-25 17:17:58 +01:00
- name: Compile Web Pages
2025-01-25 17:46:21 +01:00
run: $HOME/.dotnet/tools/docfx
2025-01-25 17:17:58 +01:00
- name: SFTP Deploy
uses: wlixcc/SFTP-Deploy-Action@v1.2.5
with:
username: '${{ vars.SSH_USER }}'
server: '${{ vars.SSH_SERVER }}'
port: '${{ vars.SSH_PORT }}'
ssh_private_key: ${{ secrets.SSH_PRIVATE_KEY }}
local_path: './_site/*'
remote_path: '${{ vars.DESTINATION }}'
sftpArgs: -o ConnectTimeout=10
2025-01-26 13:10:40 +01:00
rsyncArgs: --exclude=.*
- name: Clear Secrets
run: |
dotnet nuget remove source ReFuel
dotnet nuget remove source CallumDev