diff --git a/.github/workflows/publish.yaml b/.github/workflows/publish.yaml new file mode 100644 index 0000000..a2297ff --- /dev/null +++ b/.github/workflows/publish.yaml @@ -0,0 +1,32 @@ +on: + workflow_dispatch: + push: + branches: main + +name: Quarto Publish + +jobs: + build-deploy: + runs-on: ubuntu-latest + permissions: + contents: write + steps: + + - name: Setup r2u + uses: eddelbuettel/github-actions/r2u-setup@master + + - name: Package Dependencies + run: Rscript -e 'install.packages(c("mapme.biodiversity", "leaflet.extras", "leaflet", "ggplot2", "sf", "exactextractr", "landscapemetrics", "plotly"))' + + - name: Set up Quarto + uses: quarto-dev/quarto-actions/setup@v2 + + - name: Check out repository + uses: actions/checkout@v4 + + - name: Render and Publish + uses: quarto-dev/quarto-actions/publish@v2 + with: + target: gh-pages + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.gitignore b/.gitignore index 2655eaa..8a02cd2 100644 --- a/.gitignore +++ b/.gitignore @@ -7,4 +7,4 @@ /.quarto/ /docs/ -interactive-deforestation-map_files +interactive-deforestation-map_files \ No newline at end of file diff --git a/_quarto.yml b/_quarto.yml new file mode 100644 index 0000000..39cb3f2 --- /dev/null +++ b/_quarto.yml @@ -0,0 +1,3 @@ +project: + type: website + output-dir: docs \ No newline at end of file