Skip to content

0.22.0

0.22.0 #108

Workflow file for this run

name: 1115 CI Pipeline
on:
# Runs on releases
release:
types: [published]
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
permissions:
contents: read
pages: write
id-token: write
# Allow only one concurrent deployment, skipping runs queued between the run in-progress and latest queued.
# However, do NOT cancel in-progress runs as we want to allow these production deployments to complete.
concurrency:
group: "pages"
cancel-in-progress: false
jobs:
docs-deploy:
needs:
- synthetic-techbd-devl-deployment
- synthetic-techbd-staging
environment:
# i think we should adjust the environment name to match the branch name
name: "github-pages"
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Pages
uses: actions/configure-pages@v4
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
# Upload entire docs directory
path: "./support/docs"
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4
synthetic-techbd-devl-deployment:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure Git
run: |
echo "${{ secrets.DVERTOLA_GITHUB_TOKEN }}" | gh auth login --with-token
git config --global user.email "[email protected]"
git config --global user.name "mdvertola"
- name: Clone infrastructure repository
run: |
git clone https://${{secrets.DVERTOLA_GITHUB_TOKEN}}@github.com/tech-by-design/infrastructure-prime.git
- name: Update sftp environment file
run: |
cd infrastructure-prime
sed -i 's/TAG=.*/TAG=${{ github.ref_name }}/g' aws/synthetic.sftp.qualifiedentity.org/.env
- name: Update fhir environment file
run: |
cd infrastructure-prime
sed -i 's/TAG=.*/TAG=${{ github.ref_name }}/g' aws/synthetic.fhir.api.qualifiedentity.org/.env
- name: Commit and push changes
run: |
cd infrastructure-prime
git add .
git commit -m "Update for ${{ github.ref_name }} techbd-devl deployment"
git push
synthetic-techbd-staging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Configure Git
run: |
echo "${{ secrets.DVERTOLA_GITHUB_TOKEN }}" | gh auth login --with-token
git config --global user.email "[email protected]"
git config --global user.name "mdvertola"
- name: Clone infrastructure repository
run: |
git clone https://${{secrets.DVERTOLA_GITHUB_TOKEN}}@github.com/tech-by-design/infrastructure-prime.git
- name: Create and switch to a new branch
run: |
cd infrastructure-prime
git checkout -b synthetic-techbd-${{ github.ref_name}}-deployment
- name: Update sftp environment file
run: |
cd infrastructure-prime
sed -i 's/TAG=.*/TAG=${{ github.ref_name }}/g' aws/synthetic.sftp.techbd.org/.env
- name: Update fhir environment file
run: |
cd infrastructure-prime
sed -i 's/TAG=.*/TAG=${{ github.ref_name }}/g' aws/synthetic.fhir.api.techbd.org/.env
- name: Commit and push changes
run: |
cd infrastructure-prime
git add .
git commit -m "Update for ${{ github.ref_name }} techbd deployment"
git push --set-upstream origin synthetic-techbd-${{ github.ref_name}}-deployment
- name: Create Pull Request
run: |
cd infrastructure-prime
gh pr create --base main --head synthetic-techbd-${{ github.ref_name}}-deployment --title "techbd.org ${{ github.ref_name }} update" --body "Automated techbd deployment for version ${{ github.ref_name }}"