Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[athenarc] ci #12

Closed
wants to merge 1 commit into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
56 changes: 56 additions & 0 deletions .github/workflows/build_deploy_athenarc.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,56 @@
on:
push:
branches: [main,athenarc-deploy]
# pull_request:
# branches: [main,athenarc-deploy]
# 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

- uses: athenarc/actions-docker-build-push@master
id: docker_build
with:
DOCKER_REGISTRY: "pathos.docker.imsi.athenarc.gr"
DOCKER_REPO: "indicator_handbook"
DOCKER_USER: "builder"
DOCKER_PASSWORD: "${{ secrets.DOCKER_PASSWORD }}"

- uses: athenarc/actions-docker-compose-deploy@master
id: docker_deploy
with:
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 }}"
3 changes: 3 additions & 0 deletions Dockerfile
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
FROM nginx:latest

COPY _book /usr/share/nginx/html/