From f250b09084290115854ed880cee8a2954899c534 Mon Sep 17 00:00:00 2001 From: Panos Georgantas Date: Mon, 4 Sep 2023 16:22:03 +0300 Subject: [PATCH] fixes --- .github/workflows/build_deploy_athenarc.yml | 13 ++--- .github/workflows/build_handbook.yml | 56 --------------------- 2 files changed, 7 insertions(+), 62 deletions(-) delete mode 100644 .github/workflows/build_handbook.yml diff --git a/.github/workflows/build_deploy_athenarc.yml b/.github/workflows/build_deploy_athenarc.yml index 44a9081..5ed558b 100644 --- a/.github/workflows/build_deploy_athenarc.yml +++ b/.github/workflows/build_deploy_athenarc.yml @@ -1,10 +1,9 @@ on: push: - branches: [main,athenarc-deploy] - # pull_request: - # branches: [main,athenarc-deploy] - # to be able to trigger a manual build - #workflow_dispatch: + branches: [main] + pull_request: + branches: [main] + workflow_dispatch: name: Render indicator handbook @@ -46,6 +45,7 @@ jobs: DOCKER_REPO: "indicator_handbook" DOCKER_USER: "builder" DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}" + if: github.ref == 'refs/heads/main' - uses: athenarc/actions-docker-compose-deploy@master id: docker_deploy @@ -53,4 +53,5 @@ jobs: AUTH_TOKEN: "${{ secrets.DEPLOY_AUTH_TOKEN }}" USE_PULL_REPO: "false" DEPLOY_URL: "https://delphinus.imsi.athenarc.gr/docker-compose-deploy/deploy" - IMAGES: "${{ steps.docker_build.outputs.images }}" \ No newline at end of file + IMAGES: "${{ steps.docker_build.outputs.images }}" + if: github.ref == 'refs/heads/main' diff --git a/.github/workflows/build_handbook.yml b/.github/workflows/build_handbook.yml deleted file mode 100644 index 4302650..0000000 --- a/.github/workflows/build_handbook.yml +++ /dev/null @@ -1,56 +0,0 @@ -on: - push: - branches: main - pull_request: - branches: main - # to be able to trigger a manual build - workflow_dispatch: - -name: Render indicator handbook - -jobs: - - build_deploy: - runs-on: ubuntu-latest - if: github.repository == 'PathOS-project/indicator_handbook' - - steps: - - name: Checkout repository - uses: actions/checkout@v3 - with: - submodules: recursive - - - name: Setup quarto - uses: quarto-dev/quarto-actions/setup@v2 - - - name: Render quarto project - uses: quarto-dev/quarto-actions/render@v2 - - - name: Install pagemerger - run: | - curl -OL https://github.com/tymbaca/pagemerger/releases/download/v1.0.0/pagemerger_1.0-1_amd64.deb - sudo dpkg -i pagemerger_1.0-1_amd64.deb - sudo apt-get update - sudo apt-get install -y aspnetcore-runtime-7.0 - sudo chmod 755 /usr/local/bin/pagemerger - - - name: Merge cover page with rendered docx - run: | - pagemerger out.docx etc/cover.docx _book/Open-Science-Indicator-Handbook.docx - mv out.docx _book/Open-Science-Indicator-Handbook.docx - - - name: Install SSH key - if: github.ref == 'refs/heads/main' - uses: shimataro/ssh-key-action@v2 - with: - key: ${{ secrets.WEBSITE_SSH_KEY }} - name: id_rsa - known_hosts: ${{ secrets.WEBSITE_KNOWN_HOST }} - config: ${{ secrets.WEBSITE_SSH_CONFIG }} - if_key_exists: fail - - - name: Deploy using rsync - if: github.ref == 'refs/heads/main' - run: | - ls -R - rsync -avz --delete --filter='P .htaccess' _book/ website:domains/pathos.traag.net/public_html/