-
Notifications
You must be signed in to change notification settings - Fork 285
57 lines (50 loc) · 1.78 KB
/
sapling-website-deploy.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
name: Publish https://sapling-scm.com
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1-5'
jobs:
deploy:
runs-on: ubuntu-22.04
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v3
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 18
cache: yarn
cache-dependency-path: ./website
- name: Install dependencies
run: yarn install --frozen-lockfile
# Note this will use whichever release is tagged "Latest."
# Ultimately, this website deployment job should:
# - For a release, it should depend on the binaries being published and
# run afterwards with the new version.
# - For a pull request, `sl` built from the code that is out for review.
- name: Download latest Sapling release
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ${{ format('gh release download --pattern \*.Ubuntu22.04.deb --repo {0}', github.repository) }}
- name: Install Sapling
run: sudo apt install -y ./*.Ubuntu22.04.deb
- name: Write out release data
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: ${{ format('./scripts/gen_release_data.py --repo {0} --out ./src/rawReleaseData.ts', github.repository) }}
- name: Generate docstring docs
run: ./scripts/generate-command-markdown.py
- name: Build website
run: yarn build
- name: Deploy
uses: peaceiris/actions-gh-pages@v3
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build