Skip to content

Minor changes

Minor changes #41

Workflow file for this run

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Build websitino (macOS)
on:
push:
branches:
- main
tags:
- 'v*'
permissions:
contents: write
jobs:
build:
strategy:
fail-fast: false
matrix:
os: [macos-13, macos-14]
dc: [ldc-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: dlang-community/setup-dlang@v1
with:
compiler: ${{ matrix.dc }}
- name: Set version info for release
if: startsWith(github.ref, 'refs/tags/')
run: |
VERSION=$(echo ${{ github.ref }} | sed 's/refs\/tags\///')
echo "enum WEBSITINO_VERSION = \"$VERSION\";" >> source/app.d
- name: 'Build & Test'
run: |
dub build --compiler=$DC --build=release --config=macos-static
- name: Upload binary as artifact
uses: actions/upload-artifact@v4
with:
name: websitino-${{ matrix.os }}
path: websitino
- name: Pull latest changes
run: |
git checkout -- source/app.d
git fetch origin
git checkout gh-pages
git pull origin gh-pages
- name: Prepara directory per GitHub Pages
run: |
mkdir -p public/${{ matrix.os }}
cp websitino public/${{ matrix.os }}/websitino
# Pubblica su GitHub Pages
- name: Deploy su GitHub Pages
if: startsWith(github.ref, 'refs/tags/v')
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./public
force_orphan: false
keep_files: true