-
Notifications
You must be signed in to change notification settings - Fork 200
58 lines (58 loc) · 1.64 KB
/
Copy pathcd.yml
File metadata and controls
58 lines (58 loc) · 1.64 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
name: CD
on:
release:
types: [published]
permissions:
contents: read
jobs:
pages:
runs-on: ubuntu-latest
permissions:
pages: write
id-token: write
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Install mise toolchain
uses: jdx/mise-action@v4
- name: Build API documentation
run: mise run docs
- name: Configure Pages
uses: actions/configure-pages@v6
- name: Upload Pages artifact
uses: actions/upload-pages-artifact@v5
with:
path: docs/
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v5
image:
runs-on: ubuntu-latest
permissions:
packages: write
steps:
- name: Checkout repository
uses: actions/checkout@v7
- name: Set lower-case image path
run: echo "IMAGE=$(echo "ghcr.io/${{ github.repository }}" | tr '[:upper:]' '[:lower:]')" >> "$GITHUB_ENV"
- name: Log in to GitHub Container Registry
uses: docker/login-action@v4
with:
registry: ghcr.io
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v4
- name: Build and push image
uses: docker/build-push-action@v7
with:
context: .
push: true
cache-to: type=gha
cache-from: type=gha
tags: |
${{ env.IMAGE }}:latest
${{ env.IMAGE }}:${{ github.ref_name }}