File tree Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Expand file tree Collapse file tree 1 file changed +58
-0
lines changed Original file line number Diff line number Diff line change
1
+ name : Build and Deploy
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - main
7
+ paths :
8
+ - " docs/**"
9
+ - _quarto.yml
10
+ - docusaurus.config.js
11
+ - sidebars.js
12
+ pull_request :
13
+ paths :
14
+ - .github/workflows/main.yml
15
+ - " docs/**"
16
+ - _quarto.yml
17
+ - docusaurus.config.js
18
+ - sidebars.js
19
+ workflow_dispatch :
20
+
21
+ concurrency :
22
+ group : ${{ github.workflow }}-${{ github.ref }}
23
+ cancel-in-progress : true
24
+
25
+ jobs :
26
+ build :
27
+ permissions :
28
+ contents : write
29
+ runs-on : ubuntu-latest
30
+ steps :
31
+ - uses : actions/checkout@v3
32
+
33
+ - name : Install devcontainer CLI
34
+ run : npm install -g @devcontainers/cli
35
+
36
+ - name : Start dev container
37
+ run : devcontainer up --workspace-folder .
38
+
39
+ - name : Quarto render
40
+ run : devcontainer exec --workspace-folder . quarto render
41
+
42
+ - name : Docusaurus build
43
+ run : npm run build
44
+
45
+ - name : Upload artifact
46
+ if : ${{ github.event_name == 'pull_request' }}
47
+ uses : actions/upload-artifact@v3
48
+ with :
49
+ name : build
50
+ path : build
51
+
52
+ - name : Deploy to GitHub Pages
53
+ if : ${{ github.ref == 'refs/heads/main'}}
54
+ uses : peaceiris/actions-gh-pages@v3
55
+ with :
56
+ github_token : ${{ secrets.GITHUB_TOKEN }}
57
+ publish_dir : ./build
58
+ cname : rocker-project.org
You can’t perform that action at this time.
0 commit comments