-
Notifications
You must be signed in to change notification settings - Fork 6
48 lines (45 loc) · 1.38 KB
/
main.yaml
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
name: ci
on: [ push, workflow_dispatch ]
jobs:
build_containers:
name: Build containers
if: ${{ contains(github.event.head_commit.message, '[build ') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- name: Build container
env:
DOCKER_USER: ${{ secrets.DOCKER_USER }}
DOCKER_PASSWORD: ${{ secrets.DOCKER_PASSWORD }}
run: bash scripts/build_container.sh "${{ github.event.head_commit.message }}"
build_docs:
name: Build docs
if: ${{ contains(github.event.head_commit.message, 'doc') }}
runs-on: ubuntu-22.04
steps:
- name: Checkout repo
uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16
- name: Build docs
run: bash scripts/build_docs.sh
- name: Upload artifact
uses: actions/upload-pages-artifact@v3
with:
path: ./docs/.vuepress/dist
deploy_docs:
name: Deploy docs
permissions:
pages: write # to deploy to Pages
id-token: write # to verify the deployment originates from an appropriate source
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
runs-on: ubuntu-latest
needs: build_docs
steps:
- name: Deploy to GitHub Pages
id: deployment
uses: actions/deploy-pages@v4