-
Notifications
You must be signed in to change notification settings - Fork 374
62 lines (55 loc) · 1.89 KB
/
Copy pathsapling-website-deploy.yml
File metadata and controls
62 lines (55 loc) · 1.89 KB
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
60
61
62
name: Publish https://sapling-scm.com
on:
workflow_dispatch:
schedule:
- cron: '0 0 * * 1-5'
jobs:
deploy:
runs-on: ubuntu-latest
permissions:
contents: write
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
defaults:
run:
working-directory: website
steps:
- uses: actions/checkout@v6
- name: Setup Node
uses: actions/setup-node@v6
with:
node-version: 24
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 and install sapling
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
mkdir -p ~/.local/share/sl
cd ~/.local/share/sl
${{ format('gh release download --pattern \*linux-x64.tar.xz --repo {0}', github.repository) }}
tar xf *.tar.xz
realpath . >> "$GITHUB_PATH"
- name: Test sl version
run: sl version
- 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@v4
if: ${{ github.ref == 'refs/heads/main' }}
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./website/build