File tree Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Expand file tree Collapse file tree 1 file changed +49
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Deploy mdBook site to Pages
2
+
3
+ on :
4
+ workflow_dispatch :
5
+ push :
6
+ branches :
7
+ - main
8
+ - es-translation
9
+
10
+ permissions :
11
+ contents : read
12
+ pages : write
13
+ id-token : write
14
+
15
+ concurrency :
16
+ group : " pages"
17
+ cancel-in-progress : false
18
+
19
+ jobs :
20
+ # Build job
21
+ build :
22
+ runs-on : ubuntu-latest
23
+ steps :
24
+ - uses : actions/checkout@v4
25
+ - name : Install mdbook
26
+ run : |
27
+ mkdir bin
28
+ curl -sSL https://github.com/RustLangES/mdBook/releases/download/v0.4.36-localization-v0.6/mdbook-v0.4.36-localization-v0.6-x86_64-unknown-linux-gnu.tar.gz | tar -xz --directory=bin
29
+ echo "$(pwd)/bin" >> ${GITHUB_PATH}
30
+ - name : Build with mdBook
31
+ run : mdbook build
32
+ - name : Copying the index
33
+ run : cp ./index.html ./book/index.html
34
+ - name : Upload artifact
35
+ uses : actions/upload-artifact@v4
36
+ with :
37
+ path : ./book
38
+
39
+ deploy :
40
+ runs-on : ubuntu-latest
41
+ needs : build
42
+ steps :
43
+ - uses : actions/download-artifact@v4
44
+ - name : Deploy
45
+ uses : cloudflare/wrangler-action@v3
46
+ with :
47
+ apiToken : ${{ secrets.CLOUDFLARE_API_TOKEN }}
48
+ accountId : ${{ secrets.CLOUDFLARE_ACCOUNT_ID }}
49
+ command : pages deploy ./artifact --project-name=go-book
You can’t perform that action at this time.
0 commit comments