Skip to content

Commit 93c8414

Browse files
committed
Run mirror tool and publish to GH pages
1 parent 6341a5d commit 93c8414

File tree

1 file changed

+51
-0
lines changed

1 file changed

+51
-0
lines changed

.github/workflows/mirror.yml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
name: update mirror
2+
3+
permissions:
4+
contents: read
5+
6+
on:
7+
workflow_dispatch:
8+
push:
9+
branches:
10+
- main
11+
schedule:
12+
- cron: "0 0,6,12,18 * * *"
13+
14+
jobs:
15+
generate:
16+
name: Generate backend files
17+
runs-on: ubuntu-latest
18+
steps:
19+
- name: Checkout sources
20+
uses: actions/checkout@v5
21+
with:
22+
persist-credentials: false
23+
24+
- name: Install rust toolchain
25+
uses: dtolnay/rust-toolchain@stable
26+
27+
- name: Generate backend files
28+
run: |
29+
mkdir tmp/
30+
cargo run --locked --release --bin upki-mirror -- tmp/ production --manifest-comment="$GITHUB_REPOSITORY run $GITHUB_RUN_ID"
31+
32+
- name: Package and upload artifact
33+
uses: actions/upload-pages-artifact@v4
34+
with:
35+
path: ./tmp/
36+
37+
deploy:
38+
name: Deploy
39+
runs-on: ubuntu-latest
40+
if: github.repository == 'rustls/upki' && github.ref == 'refs/heads/main'
41+
needs: generate
42+
permissions:
43+
pages: write
44+
id-token: write
45+
environment:
46+
name: github-pages
47+
url: ${{ steps.deployment.outputs.page_url }}
48+
steps:
49+
- name: Deploy to GitHub Pages
50+
id: deployment
51+
uses: actions/deploy-pages@v4

0 commit comments

Comments
 (0)