Skip to content

Commit 7e026fc

Browse files
committed
Internet Draft workflow
1 parent ff3345c commit 7e026fc

File tree

2 files changed

+79
-3
lines changed

2 files changed

+79
-3
lines changed
Lines changed: 76 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,76 @@
1+
name: Build Internet Draft
2+
3+
on:
4+
push:
5+
branches: ["main"]
6+
paths: ["draft-*"]
7+
pull_request:
8+
branches: ["main"]
9+
paths: ["draft-*"]
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: write
14+
15+
concurrency:
16+
group: "pages"
17+
cancel-in-progress: false
18+
19+
jobs:
20+
build:
21+
runs-on: ubuntu-latest
22+
steps:
23+
- name: "Checkout"
24+
uses: actions/checkout@v4
25+
- name: "Setup"
26+
id: setup
27+
run: date -u "+date=%FT%T" >>"$GITHUB_OUTPUT"
28+
- name: "Caching"
29+
uses: actions/cache@v4
30+
with:
31+
path: |
32+
.refcache
33+
.venv
34+
.gems
35+
node_modules
36+
.targets.mk
37+
key: i-d-${{ steps.setup.outputs.date }}
38+
restore-keys: i-d-
39+
- name: "Build Drafts"
40+
uses: martinthomson/i-d-template@v1
41+
with:
42+
token: ${{ github.token }}
43+
- name: Upload
44+
uses: actions/upload-artifact@v4
45+
with:
46+
name: internet-draft
47+
path: draft-*.html
48+
overwrite: true
49+
50+
push:
51+
runs-on: ubuntu-latest
52+
needs: build
53+
steps:
54+
- name: Checkout
55+
uses: actions/checkout@v4
56+
with:
57+
ref: gh-pages
58+
- name: Delete
59+
run : rm -rf /tmp/internet-draft
60+
- name: Download
61+
uses: actions/download-artifact@v4
62+
with:
63+
name: internet-draft
64+
path: /tmp/internet-draft
65+
- name: Sync
66+
run: |
67+
rm -rf internet-draft
68+
mv /tmp/internet-draft .
69+
- name: Push
70+
run: |
71+
git status
72+
git add .
73+
git config --global user.name 'Deploy Bot'
74+
git config --global user.email 'deploy-bot@jsonlines.org'
75+
git commit --allow-empty -m 'Automated Internet Draft Deployment'
76+
git push

.github/workflows/jekyll.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -65,12 +65,12 @@ jobs:
6565
name: site
6666
path: /tmp/site
6767
- name: Sync
68-
run: rsync -avh --delete --exclude .git /tmp/site/ .
68+
run: rsync -avh --delete --exclude .git --exclude internet-draft /tmp/site/ .
6969
- name: Push
7070
run: |
7171
git status
7272
git add .
7373
git config --global user.name 'Deploy Bot'
7474
git config --global user.email 'deploy-bot@jsonlines.org'
75-
git commit --allow-empty -m 'Automated Deployment'
76-
git push
75+
git commit --allow-empty -m 'Automated Site Deployment'
76+
git push

0 commit comments

Comments
 (0)