new-comment #459
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: Xenial.Blog | |
on: | |
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 | |
- uses: actions/checkout@v2 | |
- 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@v4 | |
with: | |
global-json-file: ./global.json | |
- name: Install dependencies | |
run: dotnet restore build/build.csproj | |
- name: Build | |
run: dotnet run --project build/build.csproj | |
- uses: actions/upload-artifact@v4 | |
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 | |
- uses: actions/checkout@v2 | |
- name: Checkout Submodules | |
run: git submodule init | |
- name: Checkout Submodules | |
run: git submodule update | |
- uses: actions/download-artifact@v4 | |
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.delegate.at | |
env: | |
FTP_HOST: ${{secrets.FTP_HOST}} | |
FTP_PASS: ${{secrets.FTP_PASS}} | |
FTP_USER: ${{secrets.FTP_USER}} | |
FTP_DIRECTORY: "/blog" | |
run: dotnet run --project build/build.csproj deploy |