From f0ec5e75e9e68ef90603fcd7486fcaf2f9199ce4 Mon Sep 17 00:00:00 2001 From: Jakub Nowosad Date: Sun, 22 Sep 2024 16:27:42 +0200 Subject: [PATCH] tests new gha approach --- .github/workflows/main.yaml | 90 ++++++++++++++++----------------- .github/workflows/main_new.yaml | 39 ++++++++++++++ _publish.yml | 4 ++ 3 files changed, 88 insertions(+), 45 deletions(-) create mode 100644 .github/workflows/main_new.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml index 9cad9e0..51ff7bd 100644 --- a/.github/workflows/main.yaml +++ b/.github/workflows/main.yaml @@ -1,47 +1,47 @@ -on: - workflow_dispatch: - push: - branches: - [main] - pull_request: -name: Quarto Publish -jobs: - bookdown: - name: GH-Pages - runs-on: ubuntu-latest - permissions: - contents: write - statuses: write - steps: - - uses: actions/checkout@v3 - - uses: julia-actions/setup-julia@v2 - - uses: julia-actions/cache@v2 - - name: Set up custom Julia dependencies - run: | - using Pkg - Pkg.activate("quarto"; shared = true) - # TODO: QuartoNotebookRunner does not support execute-dir yet, but this PR does. - Pkg.add(url = "https://github.com/asinghvi17/QuartoNotebookRunner.jl", rev = "as/execute-dir") - Pkg.instantiate() - Pkg.activate(".") - Pkg.add([ - # TODO: DimensionalData v0.28 is not compatible with Rasters latest version, - # and has Makie fixes that we need for the book, otherwise plotting errors out. - # These can be removed after Rasters.jl's new breaking version. - PackageSpec(url = "https://github.com/asinghvi17/Rasters.jl", rev = "as/dd28"), - PackageSpec(url = "https://github.com/rafaqz/DimensionalData.jl", rev = "main"), - ]) - shell: julia {0} - - uses: julia-actions/julia-buildpkg@v1 +# on: +# workflow_dispatch: +# push: +# branches: +# [main] +# pull_request: +# name: Quarto Publish +# jobs: +# bookdown: +# name: GH-Pages +# runs-on: ubuntu-latest +# permissions: +# contents: write +# statuses: write +# steps: +# - uses: actions/checkout@v3 +# - uses: julia-actions/setup-julia@v2 +# - uses: julia-actions/cache@v2 +# - name: Set up custom Julia dependencies +# run: | +# using Pkg +# Pkg.activate("quarto"; shared = true) +# # TODO: QuartoNotebookRunner does not support execute-dir yet, but this PR does. +# Pkg.add(url = "https://github.com/asinghvi17/QuartoNotebookRunner.jl", rev = "as/execute-dir") +# Pkg.instantiate() +# Pkg.activate(".") +# Pkg.add([ +# # TODO: DimensionalData v0.28 is not compatible with Rasters latest version, +# # and has Makie fixes that we need for the book, otherwise plotting errors out. +# # These can be removed after Rasters.jl's new breaking version. +# PackageSpec(url = "https://github.com/asinghvi17/Rasters.jl", rev = "as/dd28"), +# PackageSpec(url = "https://github.com/rafaqz/DimensionalData.jl", rev = "main"), +# ]) +# shell: julia {0} +# - uses: julia-actions/julia-buildpkg@v1 - - name: Set up Quarto - uses: quarto-dev/quarto-actions/setup@v2 - env: - QUARTO_JULIA_PROJECT: "@quarto" +# - name: Set up Quarto +# uses: quarto-dev/quarto-actions/setup@v2 +# env: +# QUARTO_JULIA_PROJECT: "@quarto" - - name: Render and Publish - run: julia helpers/deploy_with_preview.jl - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - QUARTO_JULIA_PROJECT: "@quarto" - DATAFRAMES_ROWS: "6" +# - name: Render and Publish +# run: julia helpers/deploy_with_preview.jl +# env: +# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} +# QUARTO_JULIA_PROJECT: "@quarto" +# DATAFRAMES_ROWS: "6" diff --git a/.github/workflows/main_new.yaml b/.github/workflows/main_new.yaml new file mode 100644 index 0000000..4d486ed --- /dev/null +++ b/.github/workflows/main_new.yaml @@ -0,0 +1,39 @@ +jobs: + bookdown: + name: GH-Pages + runs-on: ubuntu-latest + permissions: + contents: write + statuses: write + steps: + - uses: actions/checkout@v3 + - uses: julia-actions/setup-julia@v2 + - uses: julia-actions/cache@v2 + - name: Set up custom Julia dependencies + run: | + using Pkg + Pkg.activate("quarto"; shared = true) + # TODO: QuartoNotebookRunner does not support execute-dir yet, but this PR does. + Pkg.add(url = "https://github.com/asinghvi17/QuartoNotebookRunner.jl", rev = "as/execute-dir") + Pkg.instantiate() + Pkg.activate(".") + Pkg.add([ + # TODO: DimensionalData v0.28 is not compatible with Rasters latest version, + # and has Makie fixes that we need for the book, otherwise plotting errors out. + # These can be removed after Rasters.jl's new breaking version. + PackageSpec(url = "https://github.com/asinghvi17/Rasters.jl", rev = "as/dd28"), + PackageSpec(url = "https://github.com/rafaqz/DimensionalData.jl", rev = "main"), + ]) + shell: julia {0} + - uses: julia-actions/julia-buildpkg@v1 + + - name: Set up Quarto + uses: quarto-dev/quarto-actions/setup@v2 + env: + QUARTO_JULIA_PROJECT: "@quarto" + + - name: Render and Publish + uses: quarto-dev/quarto-actions/publish@v2 + with: + target: netlify + NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }} \ No newline at end of file diff --git a/_publish.yml b/_publish.yml index e69de29..b86cace 100644 --- a/_publish.yml +++ b/_publish.yml @@ -0,0 +1,4 @@ +- source: project + netlify: + - id: "e18690e5-215e-4584-b0f1-963bc99a10d0" + url: "https://jl.geocompx.org" \ No newline at end of file