Skip to content

Commit

Permalink
Fix broken links
Browse files Browse the repository at this point in the history
  • Loading branch information
Piotr Chmielnik committed Feb 23, 2024
1 parent 6daa1c8 commit 819e801
Showing 1 changed file with 6 additions and 4 deletions.
10 changes: 6 additions & 4 deletions .github/workflows/publish_site.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,6 +25,8 @@ jobs:
build:
needs: setup
runs-on: ubuntu-latest
outputs:
website_version: ${{ steps.set_output.outputs.website_version }}
steps:
- uses: actions/checkout@v4
- uses: ruby/setup-ruby@v1
Expand All @@ -35,6 +37,7 @@ jobs:
run: |
sed -i '/^url:/c\url: "https://${{ env.WEBSITE_URL }}"' _config.yml
WEBSITE_VERSION=$(cat _config.yml|grep "^opensearch_major_minor_version:"|cut -d ':' -f2| tr -d '[:blank:]')
echo "::set-output name=website_version::$WEBSITE_VERSION"
sed -i '/^baseurl:/c\baseurl: "/docs/'"$WEBSITE_VERSION"'"' _config.yml
cat _config.yml|grep -e "^url:" -e "^baseurl:"
- run: bundle exec jekyll build --future
Expand All @@ -46,7 +49,7 @@ jobs:

deploy:
needs: build
runs-on: ubuntu-latest
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
steps:
- uses: actions/download-artifact@v4
Expand All @@ -64,14 +67,13 @@ jobs:
run: |
sudo apt install lftp -y
lftp --version
WEBSITE_VERSION=$(cat _site/_config.yml|grep "^opensearch_major_minor_version:"|cut -d ':' -f2| tr -d '[:blank:]')
echo "Start SFTP upload"
lftp -u ${{ secrets.SFTP_USERNAME }}, -e "set sftp:connect-program 'ssh -a -x -o StrictHostKeyChecking=no'; mkdir -p /var/www/${{ env.WEBSITE_URL }}/html/$WEBSITE_VERSION; mirror --reverse --parallel=20 --verbose _site/ /var/www/${{ env.WEBSITE_URL }}/html/$WEBSITE_VERSION/; quit" sftp://${{ secrets.SFTP_SERVER }}
lftp -u ${{ secrets.SFTP_USERNAME }}, -e "set sftp:connect-program 'ssh -a -x -o StrictHostKeyChecking=no'; mkdir -p /var/www/${{ env.WEBSITE_URL }}/html/${{ needs.job1.outputs.website_version }}; mirror --reverse --parallel=20 --verbose _site/ /var/www/${{ env.WEBSITE_URL }}/html/$WEBSITE_VERSION/; quit" sftp://${{ secrets.SFTP_SERVER }}
post_deploy:
needs: deploy
runs-on: ubuntu-latest
if: github.event_name != 'pull_request'
if: github.event_name != ' pull_request'
steps:
- name: Purge Cloudflare Cache
run: |
Expand Down

0 comments on commit 819e801

Please sign in to comment.