Skip to content

Commit fe59f7d

Browse files
committed
ci: rework to use the container
Signed-off-by: Davide Cavalca <davide@cavalca.name>
1 parent 8b1592e commit fe59f7d

4 files changed

Lines changed: 38 additions & 32 deletions

File tree

.github/workflows/ci.yml

Lines changed: 0 additions & 31 deletions
This file was deleted.

.github/workflows/container.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,15 @@ on:
33
push:
44
branches:
55
- main
6+
paths:
7+
- .github/workflows/container.yml
8+
- Dockerfile
69
pull_request:
710
branches:
811
- main
12+
paths:
13+
- .github/workflows/container.yml
14+
- Dockerfile
915

1016
env:
1117
REGISTRY: ghcr.io

.github/workflows/pages.yml

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: Pages
2+
on:
3+
push:
4+
branches:
5+
- main
6+
pull_request:
7+
branches:
8+
- main
9+
10+
permissions:
11+
contents: write
12+
13+
jobs:
14+
deploy:
15+
runs-on: ubuntu-latest
16+
container: ghcr.io/asahilinux/mkdocs-asahi
17+
steps:
18+
- name: Checkout
19+
uses: actions/checkout@v4
20+
with:
21+
submodules: true
22+
- name: Configure Git Credentials
23+
run: |
24+
git config user.name github-actions[bot]
25+
git config user.email 41898282+github-actions[bot]@users.noreply.github.com
26+
- name: Build
27+
if: github.event_name == 'pull_request'
28+
run: mkdocs build
29+
- name: Build and deploy to GitHub Pages
30+
if: github.event_name != 'pull_request'
31+
run: mkdocs gh-deploy --force

Dockerfile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@ LABEL org.opencontainers.image.licenses=MIT
55
LABEL org.opencontainers.image.source=https://github.com/AsahiLinux/docs
66
LABEL org.opencontainers.image.vendor="Asahi Linux"
77

8-
RUN dnf -y install mkdocs-material mkdocs-material+imaging python3-mkdocs-redirects && dnf -y clean all
8+
RUN dnf -y install git-core mkdocs-material mkdocs-material+imaging python3-mkdocs-redirects && dnf -y clean all
99

1010
RUN mkdir /docs
1111

0 commit comments

Comments
 (0)