Skip to content

Xenial.Blog.xenial-io #323

Xenial.Blog.xenial-io

Xenial.Blog.xenial-io #323

name: Xenial.Blog.xenial-io
on:
schedule:
- cron: "30 0 * * *"
push:
branches: [main]
pull_request:
branches: [main]
repository_dispatch:
types: [new-comment]
jobs:
build:
runs-on: windows-latest
steps:
- uses: actions/checkout@v2
- name: Fetch all history for all tags and branches
run: git fetch --prune --unshallow
- name: Checkout Submodules
run: git submodule init
- name: Checkout Submodules
run: git submodule update
- uses: actions/setup-node@v1
with:
node-version: 12
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.400
- name: Install dependencies
run: dotnet restore build/build.csproj
- name: Build
env:
XENIAL-IO: true
run: dotnet run --project build/build.csproj
- uses: actions/upload-artifact@v2
if: github.event.pull_request == false
with:
name: _site
path: _site/
deploy-packages:
runs-on: ubuntu-latest
needs: [build]
if: github.event.pull_request == false
steps:
- uses: actions/checkout@v2
- name: Checkout Submodules
run: git submodule init
- name: Checkout Submodules
run: git submodule update
- uses: actions/download-artifact@v2
with:
name: _site
path: _site/
- name: Setup .NET Core
uses: actions/setup-dotnet@v1
with:
dotnet-version: 6.0.400
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install wheel
pip install creep
- name: Publish to blog.xenial.io
env:
FTP_HOST: ${{secrets.FTP_HOST}}
FTP_PASS: ${{secrets.FTP_PASS}}
FTP_USER: ${{secrets.FTP_USER}}
FTP_DIRECTORY: /blog_xenial
run: dotnet run --project build/build.csproj deploy