-
Notifications
You must be signed in to change notification settings - Fork 3
100 lines (85 loc) · 2.65 KB
/
deploy-bookdown.yaml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
name: Docker image
on:
schedule:
- cron: '0 1 1,16 * *'
push:
branches:
- main
env:
registry: ghcr.io
user: js2264
repository: ohca
jobs:
build-push:
strategy:
matrix:
BIOC_VERSION: [devel, RELEASE_3_17]
runs-on: ubuntu-latest
name: ${{ matrix.BIOC_VERSION }}
permissions:
contents: read
packages: write
steps:
- name: 🧾 Checkout repository
uses: actions/checkout@v3
with:
persist-credentials: false
- name: 📀 Free Disk Space (Ubuntu)
uses: jlumbroso/[email protected]
- name: 𝌚 Get current package version
id: version
run: |
version=$(grep -m1 -E '^Version: +' DESCRIPTION | sed -E 's/.*: +//')
- name: 🔐 Log in to the Container registry
uses: docker/login-action@v2
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.PAT_GITHUB }}
- name: 🏷 Get metadata for Docker
id: meta
uses: docker/metadata-action@v4
with:
images: ghcr.io/js2264/ohca
tags: |
type=raw,value=latest,enable=true
type=raw,value=${{ steps.version.outputs.version }},enable=true
type=raw,value=bioc_${{ matrix.BIOC_VERSION }},enable=true
- name: 👷 Build and push multi-arch Docker image
uses: docker/build-push-action@v4
with:
context: .
GITHUB_TOKEN: ${{ secrets.PAT_GITHUB }}
platforms: linux/amd64
file: Dockerfile
push: true
tags: ${{ steps.meta.outputs.tags }}
outputs: type=image,annotation-index.org.opencontainers.image.description=OHCA
build-args: |
VERSION=${{ steps.version.outputs.version }}
BIOC_VERSION=${{ matrix.BIOC_VERSION }}
render-deploy:
needs: build-push
strategy:
matrix:
BIOC_VERSION: [devel]
runs-on: ubuntu-latest
container: ghcr.io/js2264/ohca:bioc_${{ matrix.BIOC_VERSION }}
steps:
- name: 🧾 Checkout repository
uses: actions/checkout@v3
with:
persist-credentials: false
- name: 🖌 Render OHCA book from versionized OHCA container
run: |
quarto install tinytex
quarto render
- name: 📚 Install rsync
run: |
apt-get update && apt-get install -y rsync
- name: 🚀 Deploy OHCA book to Github Pages on versionized branch
uses: JamesIves/[email protected]
with:
folder: docs/
branch: bioc_${{ matrix.BIOC_VERSION }}
clean: true