Skip to content

Commit 25916e0

Browse files
committed
ci: rework to use the container
Signed-off-by: Davide Cavalca <[email protected]>
1 parent a61ccfe commit 25916e0

File tree

3 files changed

+37
-31
lines changed

3 files changed

+37
-31
lines changed

.github/workflows/ci.yml

-31
This file was deleted.

.github/workflows/container.yml

+6
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

+31
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 --global user.name github-actions[bot]
25+
git config --global 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

0 commit comments

Comments
 (0)