-
Notifications
You must be signed in to change notification settings - Fork 0
65 lines (54 loc) · 1.67 KB
/
Copy pathmain.yml
File metadata and controls
65 lines (54 loc) · 1.67 KB
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
name: Build and Deploy Quarto Site
on:
push:
branches:
- master
workflow_dispatch:
jobs:
build-and-deploy:
runs-on: ubuntu-latest
permissions:
contents: read
packages: write
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Create notebooks.qmd
run: |
cat <<EOF > notebooks.qmd
---
title: "Notebooks"
listing:
contents: notebooks
sort: "title asc"
type: table
categories: false
sort-ui: false
filter-ui: false
fields: [title]
page-layout: full
title-block-banner: true
---
Collection of short notebooks that don't qualify as full-length articles.
EOF
- name: Checkout notebooks
run: |
git clone https://github.com/SaremS/sample_notebooks
cp -r sample_notebooks notebooks
rm -r sample_notebooks
- name: Install Quarto
uses: quarto-dev/quarto-actions/setup@v2
- name: Render Quarto site
run: quarto render
- name: Generate image tag
id: tag
shell: bash
run: |
IMAGE_TAG=$(date '+%Y-%m-%d-%H-%M')
echo "IMAGE_TAG=$IMAGE_TAG" >> $GITHUB_ENV
- name: Build the Docker image
run: docker build . -t ghcr.io/sarems/blog:${{ env.IMAGE_TAG }}
- name: Log in to GitHub Container Registry
run: echo "${{ secrets.GITHUB_TOKEN }}" | docker login ghcr.io -u ${{ github.actor }} --password-stdin
- name: Push Docker Image
run: docker push ghcr.io/sarems/blog:${{ env.IMAGE_TAG }}