Skip to content

Commit 4e07209

Browse files
committed
Add GHA setup to build and public RFCs.
1 parent 183458c commit 4e07209

File tree

1 file changed

+71
-0
lines changed

1 file changed

+71
-0
lines changed

.github/workflows/web-publish.yml

Lines changed: 71 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,71 @@
1+
# Simple workflow for deploying static content to GitHub Pages
2+
name: Web Publish
3+
4+
on:
5+
# Runs on pushes targeting the default branch
6+
push:
7+
branches: ["main"]
8+
9+
# Allows you to run this workflow manually from the Actions tab
10+
workflow_dispatch:
11+
12+
# Run periodically to verify publish works.
13+
# schedule:
14+
# - cron: "13 5 * * 0"
15+
16+
# Sets permissions of the GITHUB_TOKEN to allow deployment to GitHub Pages
17+
permissions:
18+
contents: read
19+
pages: write
20+
id-token: write
21+
22+
# Allow only one concurrent deployment, skipping runs queued between the run
23+
# in-progress and latest queued. However, do NOT cancel in-progress runs as we
24+
# want to allow these production deployments to complete.
25+
concurrency:
26+
group: "pages"
27+
cancel-in-progress: false
28+
29+
jobs:
30+
# Single deploy job since we're just deploying
31+
deploy:
32+
if: github.repository == 'ecostd/rfcs'
33+
environment:
34+
name: github-pages
35+
url: ${{ steps.deployment.outputs.page_url }}
36+
runs-on: ubuntu-latest
37+
steps:
38+
- name: Checkout
39+
uses: actions/checkout@main
40+
- name: Update APT Cache
41+
run: sudo apt-get update
42+
- name: Install (APT)
43+
run: sudo apt-get install asciidoctor
44+
- name: Install (B2)
45+
run: |
46+
set -e
47+
pushd ..
48+
wget "https://github.com/bfgroup/b2/archive/main.zip" -O b2.zip
49+
unzip b2.zip
50+
cd b2-main
51+
./bootstrap.sh
52+
sudo ./b2 install b2-install-layout=portable --prefix=/usr/bin
53+
popd
54+
- name: Build (Web)
55+
run: |
56+
echo "using asciidoctor ;" > project-config.jam
57+
b2 --debug-configuration -d+2 info pub
58+
- name: Commit Generated
59+
run: |
60+
git config user.email "[email protected]"
61+
git config user.name "ecostd"
62+
git commit -a -m "Update generated information." CONTRIBUTIONS.adoc
63+
- name: Setup Pages
64+
uses: actions/configure-pages@main
65+
- name: Upload artifact
66+
uses: actions/upload-pages-artifact@main
67+
with:
68+
path: ".build/pub"
69+
- name: Deploy to GitHub Pages
70+
id: deployment
71+
uses: actions/deploy-pages@main

0 commit comments

Comments
 (0)