-
Notifications
You must be signed in to change notification settings - Fork 0
53 lines (45 loc) · 1.36 KB
/
ci.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
name: Deploy
on:
workflow_dispatch:
inputs:
run-id:
description: The run-id of the workflow to fetch the artifacts from
required: true
type: number
env:
REPOSITORY: toitware/web-docs
jobs:
deploy:
runs-on: ubuntu-latest
steps:
# No need to checkout the project, since all we need is to download the
# build artifact from the build step.
- uses: actions/download-artifact@v4
with:
repository: ${{ env.REPOSITORY }}
github-token: ${{ secrets.LEON_REPOSITORY_DISPATCH }}
run-id: ${{ github.event.inputs.run-id }}
name: build
path: build
- name: Debug find
run: |
find .
- name: Untar
run: |
cd build
VERSION=$(cat VERSION)
tar x -zf $VERSION.$ARTIFACT_EXTENSION
rm $VERSION.$ARTIFACT_EXTENSION
- name: Disable Jekyll
run: |
touch build/.nojekyll
# This seems to be the simplest way to publish to a separate branch.
- name: Deploy
uses: peaceiris/actions-gh-pages@v4
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./build
# Optional. This will create a CNAME file so GitHub Pages serves it
# under this domain.
cname: docs-dev.toit.io