-
Notifications
You must be signed in to change notification settings - Fork 5
41 lines (39 loc) · 1.25 KB
/
claat.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
name: Export codelab from Google Doc
on:
push:
branches: ["main"]
pull_request:
workflow_dispatch:
jobs:
publish-codelab:
runs-on: ubuntu-latest
permissions:
contents: write
pages: write
id-token: write
concurrency:
group: "pages"
cancel-in-progress: false
environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: '1.22.2' # The Go version to download (if necessary) and use.
- run: go install github.com/googlecodelabs/tools/claat@latest
- name: Export with CLAAT
run: mkdir -p ./public/ && claat export -f html -o public docs/workshop.md
- name: Setup Pages
uses: actions/configure-pages@v5
- name: Upload artifact
if: github.ref == 'refs/heads/main' # Authorize the deployment for the main branch only
uses: actions/upload-pages-artifact@v3
with:
# Upload entire repository
path: './public'
- name: Deploy to GitHub Pages
if: github.ref == 'refs/heads/main' # Authorize the deployment for the main branch only
id: deployment
uses: actions/deploy-pages@v4