diff --git a/.github/workflows/ghbuild.yml b/.github/workflows/ghbuild.yml new file mode 100644 index 0000000000..c15d8df3b0 --- /dev/null +++ b/.github/workflows/ghbuild.yml @@ -0,0 +1,23 @@ +# This workflow reuses the World Health Organization GitHub action for building IGs +# Initial idea by Carl Leitner +# Change log: +# v0.1.0 +# 2021-06-18: publish default branches to / , other branches branches/ +# 2021-11-26: reusable workflow + +name: ghbuild + +# Controls when the action will run. +on: + # Triggers the workflow on push or pull request events for any main branch + push: + branches-ignore: + - 'gh-pages' + pull_request: + + workflow_dispatch: + +jobs: + # This workflow contains a single job called "build" + call_build: + uses: WorldHealthOrganization/smart-base/.github/workflows/ghbuild.yml@main diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml deleted file mode 100644 index bf9be539d8..0000000000 --- a/.github/workflows/main.yml +++ /dev/null @@ -1,83 +0,0 @@ -# This is a simple workflow that runs the publisher and copies the output to https://.github.io//index.html -# Based on the instructions from Elliot Silver, available from: https://www.argentixinfo.com/archives/156 -# Make sure your repo has a branch called gh-pages - - -# Update 15-Jan-2021: This now adds a FTP upload feature. This uses a repository secret. -# Action documentation -# https://github.com/marketplace/actions/ftp-deploy - -name: CI - -# Controls when the action will run. -on: - # Triggers the workflow on push or pull request events but only for the main branch and any other indicated branches - push: - branches: - - main - - master - - rc1 - - rc2 - - qr-encoding - - rc2-umbrella - - rc2-ddcc - - ddcc-tr - pull_request: - branches: - - main - - master - - rc1 - - rc2 - - # Allows you to run this workflow manually from the Actions tabs - workflow_dispatch: - -# A workflow run is made up of one or more jobs that can run sequentially or in parallel -jobs: - # This workflow contains a single job called "build" - build: - # The type of runner that the job will run on - runs-on: ubuntu-latest - - # Steps represent a sequence of tasks that will be executed as part of the job - steps: - # Checks-out your repository under $GITHUB_WORKSPACE, so your job can access it - - uses: actions/checkout@v2 - - name: Update the image to the latest publisher - uses: docker://hl7fhir/ig-publisher-base:latest - with: - # Get the latest publisher - don't run the batch script but run the line directly - args: curl -L https://github.com/HL7/fhir-ig-publisher/releases/download/1.5.1/publisher.jar -o ./input-cache/publisher.jar --create-dirs - - - name: Run the IG publisher - uses: docker://hl7fhir/ig-publisher-base:latest - with: - # Run the publisher - don't run the batch script but run the line directly - args: java -Xmx4g -jar ./input-cache/publisher.jar publisher -ig . - - - run: sed -i 's/\(\s*

\).*v\([0-9]*\.[0-9]*\.[0-9]*\).*\(<\/p>\s*\)/\1This is the continuous build for version \2. This version is based on the current content of https:\/\/github.com\/WorldHealthOrganization\/ddcc<\/a> and changes regularly.\3/' ./output/*.html - - # deploy with output directory indicated by the tag or branch that triggered this workflow - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./output - destination_dir: ${{ github.ref }} - keep_files: true - #force_orphan: true - - # if it is the main branch, deploy to main directory - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - if: ${{ github.ref == 'refs/heads/main' || github.ref =='refs/heads/master' }} - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./output - keep_files: true - #force_orphan: true - - -# - name: 🚚 Get latest code -# uses: actions/checkout@v2.3.2 -