-
Notifications
You must be signed in to change notification settings - Fork 301
77 lines (73 loc) · 2.38 KB
/
publish-docs.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
name: Publish Docs
on:
workflow_dispatch:
inputs:
tag:
description: The tag to build from.
required: true
jobs:
setup:
uses: ./.github/workflows/setup-runner.yml
with:
username: master
runner_type: builder-x86
secrets: inherit
publish:
needs: setup
runs-on: master-x86
steps:
- uses: actions/checkout@v4
with:
ref: ${{ inputs.tag || github.ref }}
- uses: ./.github/ci-setup-action
env:
DOCKERHUB_PASSWORD: "${{ secrets.DOCKERHUB_PASSWORD }}"
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
with:
concurrency_key: docs-preview-${{ inputs.username || github.actor }}-x86
- timeout-minutes: 25
run: |
earthly-ci --no-output ./docs/+deploy-prod \
--NETLIFY_AUTH_TOKEN=${{ secrets.NETLIFY_AUTH_TOKEN }} \
--NETLIFY_SITE_ID=${{ secrets.NETLIFY_SITE_ID }} \
--COMMIT_TAG=${{ inputs.tag }}
pdf:
needs: setup
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v3
with:
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
path: aztec-packages
- name: Install Prince
run: |
curl https://www.princexml.com/download/prince-14.2-linux-generic-x86_64.tar.gz -O
tar zxf prince-14.2-linux-generic-x86_64.tar.gz
cd prince-14.2-linux-generic-x86_64
yes "" | sudo ./install.sh
- name: Serve docs
run: |
cd aztec-packages/docs
yarn install
yarn build
yarn serve &
- name: Checkout PDF repo
uses: actions/checkout@v3
with:
token: ${{ secrets.AZTEC_BOT_GITHUB_TOKEN }}
repository: AztecProtocol/protocol-specs-pdf
path: protocol-specs-pdf
- name: Generate PDF
run: |
npx docusaurus-prince-pdf -u http://localhost:3000/protocol-specs/intro --output protocol-specs-pdf/protocol-specs.pdf
timeout-minutes: 4
- name: Push to PDF repo
run: |
git config --global user.name AztecBot
git config --global user.email [email protected]
cd protocol-specs-pdf
git add protocol-specs.pdf
git commit -m "chore: update protocol-specs.pdf"
git push origin main