Merge branch 'main' into updatechecker

This commit is contained in:
Seaswimmer 2024-01-07 12:50:10 +00:00
commit 602f999285

View file

@ -15,10 +15,6 @@ jobs:
with: with:
fetch-depth: 0 fetch-depth: 0
- uses: actions/env@v2
- name: Set branch name
run: echo "BRANCH=$CI_ACTION_REF_NAME_SLUG" >> $GITHUB_ENV
- name: Install dependencies - name: Install dependencies
run: poetry install --with docs --with dev --no-root run: poetry install --with docs --with dev --no-root
@ -26,6 +22,9 @@ jobs:
run: mkdocs build run: mkdocs build
continue-on-error: true continue-on-error: true
- name: Set Environment Variables
uses: actions/env@v2
- name: Deploy the documentation to Meli (CoastalCommits Pages) - name: Deploy the documentation to Meli (CoastalCommits Pages)
run: | run: |
GREEN='\033[0;32m' GREEN='\033[0;32m'
@ -35,32 +34,16 @@ jobs:
unset GITHUB_TOKEN unset GITHUB_TOKEN
unset GITLAB_TOKEN unset GITLAB_TOKEN
echo "${YELLOW}Deploying to ${BLUE}Meli ${YELLOW}on branch ${GREEN}$CI_ACTION_REF_NAME_SLUG${YELLOW}...\n"
echo "branch = ${{ env.BRANCH }}"
echo "github.ref = ${{ github.ref }}"
echo "github.base_ref = ${{ github.base_ref }}"
echo "github.ref_name = ${{ github.ref_name }}"
echo "(Basename) branch = $(basename "${{ env.BRANCH }}")"
echo "(Basename) github.ref = $(basename "${{ github.ref }}")"
echo "(Basename) github.base_ref = $(basename "${{ github.base_ref }}")"
echo "(Basename) github.ref_name = $(basename "${{ github.ref_name }}")"
if [ -n "${{ github.base_ref }}" ]; then
release="$(basename "${{ github.base_ref }}")"
else
release="$(basename "${{ github.ref }}")"
fi
echo "${YELLOW}Deploying to ${BLUE}Meli ${YELLOW}on branch ${GREEN}$release${YELLOW}...\n"
npx -p "@getmeli/cli" meli upload ./site \ npx -p "@getmeli/cli" meli upload ./site \
--url "https://pages.coastalcommits.com" \ --url "https://pages.coastalcommits.com" \
--site "${{ vars.MELI_SITE_ID }}" \ --site "${{ vars.MELI_SITE_ID }}" \
--token "${{ secrets.MELI_SITE_SECRET }}" \ --token "${{ secrets.MELI_SITE_SECRET }}" \
--release "$release/$(git rev-parse HEAD)" \ --release "$CI_ACTION_REF_NAME_SLUG/$(git rev-parse HEAD)" \
--branch "$release" --branch "$CI_ACTION_REF_NAME_SLUG"
echo "\n${YELLOW}Deployed to ${BLUE}Meli ${YELLOW}on branch ${GREEN}$release${YELLOW}!" echo "\n${YELLOW}Deployed to ${BLUE}Meli ${YELLOW}on branch ${GREEN}$CI_ACTION_REF_NAME_SLUG${YELLOW}!"
env: env:
GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }} GITEA_TOKEN: ${{ secrets.COASTALCOMMITSTOKEN }}
continue-on-error: true continue-on-error: true