-
Notifications
You must be signed in to change notification settings - Fork 1
59 lines (50 loc) · 1.34 KB
/
main.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
name: Build and Deploy
on:
push:
branches:
- main
paths:
- "docs/**"
- _quarto.yml
- docusaurus.config.js
- sidebars.js
pull_request:
paths:
- .github/workflows/main.yml
- "docs/**"
- _quarto.yml
- docusaurus.config.js
- sidebars.js
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
build:
permissions:
contents: write
runs-on: ubuntu-latest
steps:
- name: Install devcontainer CLI
run: npm install -g @devcontainers/cli
- name: Start dev container
run: devcontainer up --workspace-folder .
- name: Start dev container
run: devcontainer up --workspace-folder .
- name: Quarto render
run: devcontainer exec --workspace-folder . quarto render
- name: Docusaurus build
run: npm run build
- name: Upload artifact
if: ${{ github.event_name == 'pull_request' }}
uses: actions/upload-artifact@v3
with:
name: build
path: build
- name: Deploy to GitHub Pages
if: ${{ github.ref == 'refs/heads/main'}}
uses: peaceiris/actions-gh-pages@v3
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./build
cname: rocker-project.org