Skip to content

Commit b811f44

Browse files
Steve Liangclaude
authored andcommitted
Update CI to use actions-mn/build-and-publish@v1
Replace deprecated actions-mn/cli/site-gen with actions-mn/build-and-publish@v1 per current Metanorma sample repos. Simplify both workflows, add concurrency controls, and upload compiled artifacts. Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
1 parent a09f6d9 commit b811f44

2 files changed

Lines changed: 15 additions & 50 deletions

File tree

.github/workflows/docker.yml

Lines changed: 7 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -11,40 +11,21 @@ on:
1111
repository_dispatch:
1212
types: [ metanorma/metanorma-docker ]
1313

14+
concurrency:
15+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
16+
cancel-in-progress: true
17+
1418
jobs:
1519
test-docker:
1620
runs-on: ubuntu-latest
1721
container: docker://metanorma/mn
1822
steps:
1923
- uses: actions/checkout@v4
2024
with:
21-
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || github.token }}
2225
submodules: true
2326

24-
- uses: actions/cache@v4
25-
with:
26-
path: /config/fonts
27-
key: fontist-docker
28-
restore-keys: fontist-docker
29-
30-
- uses: actions/cache@v4
31-
with:
32-
path: ~/.metanorma-ietf-workgroup-cache.json
33-
key: metanorma-ietf-workgroup-cache
34-
restore-keys: metanorma-ietf-workgroup-cache
35-
36-
- uses: metanorma/metanorma-build-scripts/gh-rubygems-setup-action@main
37-
with:
38-
token: ${{ secrets.METANORMA_CI_PAT_TOKEN }}
39-
40-
- run: |
41-
curl -L --retry 3 https://raw.githubusercontent.com/metanorma/metanorma-build-scripts/main/gemfile-to-bundle-add.sh | bash
42-
43-
- uses: actions-mn/cli/site-gen@main
27+
- uses: actions-mn/build-and-publish@v1
4428
with:
4529
agree-to-terms: true
46-
47-
- uses: actions/upload-artifact@v4
48-
with:
49-
name: site
50-
path: site
30+
destination: artifact
31+
artifact-name: ${{ github.repository_owner }}-${{ github.event.repository.name }}-docker

.github/workflows/generate.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,12 @@ on:
1010
- .github/workflows/docker.yml
1111
workflow_dispatch:
1212

13+
concurrency:
14+
group: ${{ github.workflow }}-${{ github.head_ref || github.ref_name }}
15+
cancel-in-progress: true
16+
1317
jobs:
14-
test-linux:
18+
site-generate:
1519
name: Test on ${{ matrix.os }}
1620
runs-on: ${{ matrix.os }}
1721
strategy:
@@ -21,32 +25,12 @@ jobs:
2125
steps:
2226
- uses: actions/checkout@v4
2327
with:
24-
token: ${{ secrets.METANORMA_CI_PAT_TOKEN || github.token }}
2528
submodules: true
2629

27-
- uses: actions/cache@v4
28-
with:
29-
path: ~/.cache/xml2rfc
30-
key: xml2rfc
31-
restore-keys: xml2rfc
32-
33-
- uses: actions/cache@v4
34-
with:
35-
path: ~/.fontist
36-
key: fontist-${{ runner.os }}
37-
restore-keys: fontist-${{ runner.os }}
38-
39-
- uses: actions/cache@v4
40-
with:
41-
path: ~/.metanorma-ietf-workgroup-cache.json
42-
key: metanorma-ietf-workgroup-cache
43-
restore-keys: metanorma-ietf-workgroup-cache
44-
45-
- if: matrix.os == 'windows-latest'
46-
run: rm Gemfile
47-
4830
- uses: actions-mn/setup@main
4931

50-
- uses: actions-mn/cli/site-gen@main
32+
- uses: actions-mn/build-and-publish@v1
5133
with:
5234
agree-to-terms: true
35+
destination: artifact
36+
artifact-name: ${{ github.repository_owner }}-${{ github.event.repository.name }}-${{ matrix.os }}

0 commit comments

Comments
 (0)