Skip to content

Publish GRETL documentation and website #51

Publish GRETL documentation and website

Publish GRETL documentation and website #51

Workflow file for this run

on:
workflow_dispatch:
inputs:
commit:
description: 'Commit SHA'
required: false
default: 'master'
# push:
# branches: main
name: Publish GRETL documentation and website
jobs:
build-deploy:
runs-on: ubuntu-latest
permissions:
contents: write
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Checkout GRETL repo
uses: actions/checkout@v4
with:
repository: sogis/gretl
path: gretl
#ref: V3_0_doclet
#ref: a5caad39483ee10f9aae5492a5946ca83193b1b7
ref: ${{ github.event.inputs.commit }}
- name: Debug
run: |
echo foo
echo ${{ github.event.inputs.commit }}
echo bar
- name: Debug
working-directory: gretl
run: |
pwd
ls -la
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render Quarto Project
uses: quarto-dev/quarto-actions/render@v2
- name: Debug
run: |
pwd
ls -la _site
- name: Zip quarto output
run: |
zip -r ${{ github.event.inputs.commit }}.zip _site
- name: Debug
run: |
ls -la
# - name: Get commit SHA from GRETL repo
# working-directory: gretl
# id: get_commit_sha
# run: echo "COMMIT_SHA=$(git rev-parse HEAD)" >> $GITHUB_ENV
# - name: Display Commit SHA
# run: echo "The current commit SHA is ${{ env.COMMIT_SHA }}"
# - name: Set up Quarto
# uses: quarto-dev/quarto-actions/setup@v2
# - name: Render and Publish
# uses: quarto-dev/quarto-actions/publish@v2
# with:
# target: gh-pages
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Create s3 config and credentials file
run: |
mkdir ~/.aws/
touch ~/.aws/config
touch ~/.aws/credentials
echo "[default]" > ~/.aws/config
echo "endpoint_url = ${{secrets.HETZNER_S3_ENDPOINT_URL}}" >> ~/.aws/config
echo "[default]" > ~/.aws/credentials
echo "aws_access_key_id = ${{secrets.HETZNER_S3_KEY_ID}}" >> ~/.aws/credentials
echo "aws_secret_access_key = ${{secrets.HETZNER_S3_SECRET_ACCESS_KEY}}" >> ~/.aws/credentials
- name: Debug
run: |
cat ~/.aws/config
cat ~/.aws/credentials
- name: Debug
run: |
aws s3 ls --region fsn1
# - name: Publish to S3
# run: |
# aws s3 cp ${{ github.event.inputs.commit }}.zip s3://ch-agi-geodaten-dev/ --acl public-read --region fsn1