File tree Expand file tree Collapse file tree 2 files changed +79
-3
lines changed
Expand file tree Collapse file tree 2 files changed +79
-3
lines changed Original file line number Diff line number Diff line change 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
Original file line number Diff line number Diff 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
You can’t perform that action at this time.
0 commit comments