From 828c8a540d3ad27c3effacbc65152db7f7f30ac2 Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 6 Jan 2024 19:19:34 +0000 Subject: [PATCH 1/2] fix(workflow): hopefully fixed deploying documentation on pull requests --- .forgejo/workflows/workflow.yaml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.forgejo/workflows/workflow.yaml b/.forgejo/workflows/workflow.yaml index 6ffd815..b4803d6 100644 --- a/.forgejo/workflows/workflow.yaml +++ b/.forgejo/workflows/workflow.yaml @@ -44,13 +44,20 @@ jobs: run: | export PATH="$HOME/.local/bin:$PATH" mkdocs build + continue-on-error: true - name: Deploy the documentation to Meli (CoastalCommits Pages) run: | - npx -p "@getmeli/cli" meli upload ./site \ - --url "http://pages.coastalcommits.com" \ - --site "${{ variables.MELI_SITE }}" \ - --token "${{ secrets.MELI_SITE_SECRET }}" \ - --release "$GITEA_SHA" + if [ -n "${{ github.base_ref }}" ]; then + release="${{ github.base_ref }}" + else + release="${{ github.ref }}" + fi + + npx -p "@getmeli/cli" meli upload ./site \ + --url "http://pages.coastalcommits.com" \ + --site "${{ variables.MELI_SITE }}" \ + --token "${{ secrets.MELI_SITE_SECRET }}" \ + --release "$release" env: GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }} continue-on-error: true From b21b783aa6e992e2ac69c8f3d67ca0a6b508db5e Mon Sep 17 00:00:00 2001 From: SeaswimmerTheFsh Date: Sat, 6 Jan 2024 19:24:39 +0000 Subject: [PATCH 2/2] misc(workflow): added logging for the deployment step --- .forgejo/workflows/workflow.yaml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/.forgejo/workflows/workflow.yaml b/.forgejo/workflows/workflow.yaml index b4803d6..66c139e 100644 --- a/.forgejo/workflows/workflow.yaml +++ b/.forgejo/workflows/workflow.yaml @@ -53,11 +53,15 @@ jobs: release="${{ github.ref }}" fi + echo "Deploying to Meli on branch $release" + npx -p "@getmeli/cli" meli upload ./site \ --url "http://pages.coastalcommits.com" \ --site "${{ variables.MELI_SITE }}" \ --token "${{ secrets.MELI_SITE_SECRET }}" \ --release "$release" + + echo "Deployed to Meli on branch $release" env: GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }} continue-on-error: true