workflow #2
This file contains hidden or 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
| # 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" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| 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: 'Build & Test' | |
| run: | | |
| dub build --compiler=$DC --build=release | |
| - name: Upload binary as artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: websitino-${{ matrix.os }} | |
| path: websitino | |
| - name: Prepara directory per GitHub Pages | |
| run: | | |
| mkdir -p public/macos | |
| cp websitino-${{ matrix.os }} public/macos/ | |
| # Pubblica su GitHub Pages | |
| - name: Deploy su GitHub Pages | |
| uses: peaceiris/actions-gh-pages@v3 | |
| with: | |
| github_token: ${{ secrets.GITHUB_TOKEN }} | |
| publish_dir: ./public | |
| force_orphan: false | |
| keep_files: true |